diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-07-03 15:40:21 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-07-03 15:40:21 +0400 |
commit | 310231dbed83e66ad4d17b8c25f225f60b30eeb7 (patch) | |
tree | f51322bf3e1e989d19a518b3ccf3986e82bd2e13 /app/mailers | |
parent | 1208c6caa81ab4e03301f965ec67d12e2b038358 (diff) |
Reopen mr email notification.
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index ea5671c4502..354c58678d5 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -41,6 +41,19 @@ module Emails to: recipient(recipient_id), subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end + + def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id) + @merge_request = MergeRequest.find(merge_request_id) + @mr_status = status + @project = @merge_request.project + @updated_by = User.find updated_by_user_id + @target_url = project_merge_request_url(@project, @merge_request) + set_reference("merge_request_#{merge_request_id}") + + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid}) #{@mr_status}")) + end end # Over rides default behavour to show source/target |