diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-16 19:56:47 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-16 19:56:47 +0200 |
commit | 0429740af6ce639beb1d31505c4eaa2f325893eb (patch) | |
tree | 52f5d75ec97e2400d26e91ea2353046b1ee90db8 /app/mailers | |
parent | 99490159e5f9d6ff4b45f78b977d01caa1e3c4fc (diff) | |
download | gitlab-ce-0429740af6ce639beb1d31505c4eaa2f325893eb.tar.gz |
Add @project variable to merge request emails
After this change project name appears in the top part of email when you
open/close/accept merge request.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 67544f2a331..25b8bf755e2 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -2,23 +2,27 @@ module Emails module MergeRequests def new_merge_request_email(recipient_id, merge_request_id) @merge_request = MergeRequest.find(merge_request_id) + @project = @merge_request.project mail(to: recipient(recipient_id), subject: subject("New merge request ##{@merge_request.iid}", @merge_request.title)) end def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) @merge_request = MergeRequest.find(merge_request_id) @previous_assignee = User.find_by_id(previous_assignee_id) if previous_assignee_id + @project = @merge_request.project mail(to: recipient(recipient_id), subject: subject("Changed merge request ##{@merge_request.iid}", @merge_request.title)) end def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) @merge_request = MergeRequest.find(merge_request_id) @updated_by = User.find updated_by_user_id + @project = @merge_request.project mail(to: recipient(recipient_id), subject: subject("Closed merge request ##{@merge_request.iid}", @merge_request.title)) end def merged_merge_request_email(recipient_id, merge_request_id) @merge_request = MergeRequest.find(merge_request_id) + @project = @merge_request.project mail(to: recipient(recipient_id), subject: subject("Accepted merge request ##{@merge_request.iid}", @merge_request.title)) end end |