2017-03-31 03:06:09 +00:00
|
|
|
# A discussion to wrap a number of `Note` notes on the root of a commit when they
|
|
|
|
# are displayed in context of a merge request as if they were part of a discussion.
|
2017-03-17 19:25:52 +00:00
|
|
|
class OutOfContextDiscussion < Discussion
|
|
|
|
# To make sure all out-of-context notes are displayed in one discussion,
|
|
|
|
# we override the discussion ID to be a newly generated but consistent ID.
|
|
|
|
def self.override_discussion_id(note)
|
2017-03-31 01:33:45 +00:00
|
|
|
Digest::SHA1.hexdigest(build_discussion_id_base(note).join("-"))
|
2017-03-17 19:25:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Keep this method in sync with the `potentially_resolvable` scope on `ResolvableNote`
|
|
|
|
def potentially_resolvable?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|