gitlab-org--gitlab-foss/app/views/notify/push_to_merge_request_email.text.haml
Sean McGivern 682eb75834 Fix body of email when commits are pushed to an MR
This was sending the current user, which is the recipient! It should be the user
who pushed the commits.
2018-04-03 13:22:25 +01:00

13 lines
610 B
Text

#{@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_text = "#{count} commit".pluralize(count)
* #{commits_id} - #{commits_text} from branch `#{@merge_request.target_branch}`
\
- @new_commits.each do |commit|
* #{commit[:short_id]} - #{raw commit[:title]}