diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-05 15:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-05 15:08:03 +0300 |
commit | 3c86701bc89302550abb9bbaa060132fdcd52480 (patch) | |
tree | b73328cbd2de6d43afd0eb5253ec215274011dc8 /app/mailers | |
parent | 17ef30f3df6d3939e41e69efc7cfa3deaa08605d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 341accaea32..5cbc3c9ef9c 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -155,6 +155,20 @@ module Emails end end + def approved_merge_request_email(recipient_id, merge_request_id, approved_by_user_id, reason = nil) + setup_merge_request_mail(merge_request_id, recipient_id) + + @approved_by = User.find(approved_by_user_id) + mail_answer_thread(@merge_request, merge_request_thread_options(approved_by_user_id, reason)) + end + + def unapproved_merge_request_email(recipient_id, merge_request_id, unapproved_by_user_id, reason = nil) + setup_merge_request_mail(merge_request_id, recipient_id) + + @unapproved_by = User.find(unapproved_by_user_id) + mail_answer_thread(@merge_request, merge_request_thread_options(unapproved_by_user_id, reason)) + end + private def setup_merge_request_mail(merge_request_id, recipient_id, present: false) |