diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 10:00:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 10:00:54 +0000 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/mailers/emails/merge_requests.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) | |
download | gitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/mailers/emails/merge_requests.rb')
-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)) |