diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 12:07:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 12:07:30 +0300 |
commit | 52192e0f19ca790dc9f44bc45730434100f83d90 (patch) | |
tree | 5ff86f87ba3adb239c3d42ebc9ec94e2b85d90b5 /app/mailers | |
parent | 35b0f1fe13bf40c9f27797d0a0ad26851ad8dacd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index d2e710cc329..341accaea32 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -14,10 +14,17 @@ module Emails mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason)) end - def push_to_merge_request_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil, new_commits: [], existing_commits: []) + # existing_commits - an array containing the first and last commits + def push_to_merge_request_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil, new_commits: [], total_new_commits_count: nil, existing_commits: [], total_existing_commits_count: nil) setup_merge_request_mail(merge_request_id, recipient_id) + @new_commits = new_commits + @total_new_commits_count = total_new_commits_count || @new_commits.length + @total_stripped_new_commits_count = @total_new_commits_count - @new_commits.length + @existing_commits = existing_commits + @total_existing_commits_count = total_existing_commits_count || @existing_commits.length + @updated_by_user = User.find(updated_by_user_id) mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, reason)) |