diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-11-07 09:45:31 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-11-07 09:45:31 +0300 |
commit | 6da118095b6d3b7a1cf306a82841cb265d7d8016 (patch) | |
tree | b06709420136c17444abcfd8659b6cf6ed34c9c4 /app/helpers | |
parent | 68cb1e2393ac6d82e012778d44a2e468025936b5 (diff) | |
parent | fc668d6917f6ef447c5e30d279db3621fa15498f (diff) |
Merge branch 'gt-use-merge-request-prefix-in-event-feed-title' into 'master'
Use merge request prefix symbol in event feed title
Closes #36267
See merge request gitlab-org/gitlab-ce!22449
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/events_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 2adfc04deb8..3ce2398f1de 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -91,7 +91,14 @@ module EventsHelper words << "##{event.target_iid}" if event.target_iid words << "in" elsif event.target - words << "##{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 |