Commit fd6b7b4a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Pluralize commit text for note when push to existing MR

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent b0b05aa2
......@@ -118,7 +118,8 @@ class Note < ActiveRecord::Base
end
def create_new_commits_note(noteable, project, author, commits)
body = "Pushed new commits:\n\n"
commits_text = ActionController::Base.helpers.pluralize(commits.size, 'new commit')
body = "Added #{commits_text}:\n\n"
commits.each do |commit|
message = "* #{commit.short_id} - #{commit.title}"
......
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