Commit fc668d69 authored by George Tsiolis's avatar George Tsiolis

Add issue or merge request reference prefix in the event feed title

parent 780f51ea
No related merge requests found
......@@ -90,12 +90,15 @@ module EventsHelper
elsif event.milestone?
words << "##{event.target_iid}" if event.target_iid
words << "in"
elsif event.merge_request?
words << "#{Issue.reference_prefix}#{event.target_iid}:" if event.target_iid
words << event.target.title if event.target.respond_to?(:title)
words << "at"
elsif event.target
words << "#{MergeRequest.reference_prefix}#{event.target_iid}:"
prefix =
if event.merge_request?
MergeRequest.reference_prefix
else
Issue.reference_prefix
end
words << "#{prefix}#{event.target_iid}:" if event.target_iid
words << event.target.title if event.target.respond_to?(:title)
words << "at"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment