diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-10 13:25:59 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-10 13:25:59 +0300 |
commit | 33a4439e8f079303fcf7c71267936e5c8f694958 (patch) | |
tree | 828c3c6dc55058e95927d36a3a03db9fd0263766 /app/views/notify | |
parent | 2db218f8bf186c509c927ce3e9d0502fee4f8349 (diff) | |
parent | 174950b6562226beed7eef135a2450bfee60e21f (diff) |
Merge branch 'master' into 'stuartnelson3/gitlab-ce-stn/issue-due-email'
# Conflicts:
# db/schema.rb
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/push_to_merge_request_email.html.haml | 6 | ||||
-rw-r--r-- | app/views/notify/push_to_merge_request_email.text.haml | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/notify/push_to_merge_request_email.html.haml b/app/views/notify/push_to_merge_request_email.html.haml index 5cc6f21c0f3..67744ec1cee 100644 --- a/app/views/notify/push_to_merge_request_email.html.haml +++ b/app/views/notify/push_to_merge_request_email.html.haml @@ -1,13 +1,13 @@ %h3 - New commits were pushed to the merge request + = @updated_by_user.name + pushed new commits to merge request = link_to(@merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)) - by #{@current_user.name} - if @existing_commits.any? - count = @existing_commits.size %ul %li - - if count.one? + - if count == 1 - commit_id = @existing_commits.first[:short_id] = link_to(commit_id, project_commit_url(@merge_request.target_project, commit_id)) - else diff --git a/app/views/notify/push_to_merge_request_email.text.haml b/app/views/notify/push_to_merge_request_email.text.haml index d7722e5f41f..95759d127e2 100644 --- a/app/views/notify/push_to_merge_request_email.text.haml +++ b/app/views/notify/push_to_merge_request_email.text.haml @@ -1,10 +1,10 @@ -New commits were pushed to the merge request #{@merge_request.to_reference} by #{@current_user.name} +#{@updated_by_user.name} pushed new commits to merge request #{@merge_request.to_reference} \ #{url_for(project_merge_request_url(@merge_request.target_project, @merge_request))} \ - if @existing_commits.any? - count = @existing_commits.size - - commits_id = count.one? ? @existing_commits.first[:short_id] : "#{@existing_commits.first[:short_id]}...#{@existing_commits.last[:short_id]}" + - commits_id = count == 1 ? @existing_commits.first[:short_id] : "#{@existing_commits.first[:short_id]}...#{@existing_commits.last[:short_id]}" - commits_text = "#{count} commit".pluralize(count) * #{commits_id} - #{commits_text} from branch `#{@merge_request.target_branch}` |