diff options
author | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-08 13:22:30 +0100 |
---|---|---|
committer | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-08 13:22:30 +0100 |
commit | 2c37ae2f0a7612deb4bf93fb726c98cad60ca0aa (patch) | |
tree | 7672113b2b999e4fe3c8cfa041f187773e3e8534 /app/services | |
parent | 1695063d15498ce41d3e3f62b7ec88effb9e1eca (diff) | |
parent | 08213ed4f5d35b582f0345d6a825737ced98fd05 (diff) | |
download | gitlab-ce-2c37ae2f0a7612deb4bf93fb726c98cad60ca0aa.tar.gz |
Merge gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/system_note_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 98a71cbf1ad..1083bcec054 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -41,7 +41,7 @@ class SystemNoteService # # Returns the created Note object def self.change_assignee(noteable, project, author, assignee) - body = assignee.nil? ? 'Assignee removed' : "Reassigned to @#{assignee.username}" + body = assignee.nil? ? 'Assignee removed' : "Reassigned to #{assignee.to_reference}" create_note(noteable: noteable, project: project, author: author, note: body) end @@ -66,7 +66,7 @@ class SystemNoteService def self.change_label(noteable, project, author, added_labels, removed_labels) labels_count = added_labels.count + removed_labels.count - references = ->(label) { "~#{label.id}" } + references = ->(label) { label.to_reference(:id) } added_labels = added_labels.map(&references).join(' ') removed_labels = removed_labels.map(&references).join(' ') @@ -103,7 +103,7 @@ class SystemNoteService # Returns the created Note object def self.change_milestone(noteable, project, author, milestone) body = 'Milestone ' - body += milestone.nil? ? 'removed' : "changed to #{milestone.title}" + body += milestone.nil? ? 'removed' : "changed to #{milestone.to_reference(project)}" create_note(noteable: noteable, project: project, author: author, note: body) end |