diff options
author | Michał Zając <gitlab.com@quintasan.pl> | 2019-05-16 14:59:02 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-05-16 14:59:02 +0300 |
commit | 411f545ce6a88db8370e639989d9c8f6d3621cbe (patch) | |
tree | b9fe7fa6acc5a18d0aa3a87a39481521028557d0 /app/mailers/emails/issues.rb | |
parent | 2d0f349baf83bee47c062896ac71a678e3b5f77b (diff) |
Include MR information if possible when emailing notification of closing an issue
Diffstat (limited to 'app/mailers/emails/issues.rb')
-rw-r--r-- | app/mailers/emails/issues.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index d2e334fb856..2b046d17122 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -30,8 +30,8 @@ module Emails end # rubocop: enable CodeReuse/ActiveRecord - def closed_issue_email(recipient_id, issue_id, updated_by_user_id, reason = nil) - setup_issue_mail(issue_id, recipient_id) + def closed_issue_email(recipient_id, issue_id, updated_by_user_id, reason: nil, closed_via: nil) + setup_issue_mail(issue_id, recipient_id, closed_via: closed_via) @updated_by = User.find(updated_by_user_id) mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id, reason)) @@ -91,10 +91,11 @@ module Emails private - def setup_issue_mail(issue_id, recipient_id) + def setup_issue_mail(issue_id, recipient_id, closed_via: nil) @issue = Issue.find(issue_id) @project = @issue.project @target_url = project_issue_url(@project, @issue) + @closed_via = closed_via @sent_notification = SentNotification.record(@issue, recipient_id, reply_key) end |