diff options
author | Valery Sizov <valery@gitlab.com> | 2016-07-06 16:26:59 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-07-06 20:58:43 +0300 |
commit | 3baed8cb6ddf9d46b653f17135cbffc8e662cedd (patch) | |
tree | 836cdccc6609d1d9d3a8ba52c76dadc6267fd738 /app/services/system_note_service.rb | |
parent | cfd5870b62e9d76e564ffc64db1d1281b4a363bb (diff) |
Services: code style fixes, minor refactoring
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r-- | app/services/system_note_service.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index b868d2e7e83..1ab3b5789bc 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -82,7 +82,7 @@ class SystemNoteService end body << ' ' << 'label'.pluralize(labels_count) - body = "#{body.capitalize}" + body = body.capitalize create_note(noteable: noteable, project: project, author: author, note: body) end @@ -125,7 +125,7 @@ class SystemNoteService # Returns the created Note object def self.change_status(noteable, project, author, status, source) body = "Status changed to #{status}" - body += " by #{source.gfm_reference(project)}" if source + body << " by #{source.gfm_reference(project)}" if source create_note(noteable: noteable, project: project, author: author, note: body) end @@ -139,7 +139,7 @@ class SystemNoteService # Called when 'merge when build succeeds' is canceled def self.cancel_merge_when_build_succeeds(noteable, project, author) - body = "Canceled the automatic merge" + body = 'Canceled the automatic merge' create_note(noteable: noteable, project: project, author: author, note: body) end @@ -236,6 +236,7 @@ class SystemNoteService else 'deleted' end + body = "#{verb} #{branch_type.to_s} branch `#{branch}`".capitalize create_note(noteable: noteable, project: project, author: author, note: body) end |