Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-03 15:10:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-03 15:10:26 +0300
commit94822e35f8bfbca6f7b161e22f61b086efb51b2a (patch)
tree54cd209bc30fe9e7ff84c18a7ecbb1f5c7d0b52d /app/mailers
parentf3189d2a01f0b44915b5d7a2301af1445f759c9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/pipelines.rb21
1 files changed, 10 insertions, 11 deletions
diff --git a/app/mailers/emails/pipelines.rb b/app/mailers/emails/pipelines.rb
index 1b27d062391..5363ad63771 100644
--- a/app/mailers/emails/pipelines.rb
+++ b/app/mailers/emails/pipelines.rb
@@ -2,21 +2,23 @@
module Emails
module Pipelines
- def pipeline_success_email(pipeline, recipients)
- pipeline_mail(pipeline, recipients, 'Successful')
+ def pipeline_success_email(pipeline, recipient)
+ pipeline_mail(pipeline, recipient, 'Successful')
end
- def pipeline_failed_email(pipeline, recipients)
- pipeline_mail(pipeline, recipients, 'Failed')
+ def pipeline_failed_email(pipeline, recipient)
+ pipeline_mail(pipeline, recipient, 'Failed')
end
- def pipeline_fixed_email(pipeline, recipients)
- pipeline_mail(pipeline, recipients, 'Fixed')
+ def pipeline_fixed_email(pipeline, recipient)
+ pipeline_mail(pipeline, recipient, 'Fixed')
end
private
- def pipeline_mail(pipeline, recipients, status)
+ def pipeline_mail(pipeline, recipient, status)
+ raise ArgumentError if recipient.is_a?(Array)
+
@project = pipeline.project
@pipeline = pipeline
@@ -28,10 +30,7 @@ module Emails
add_headers
- # We use bcc here because we don't want to generate these emails for a
- # thousand times. This could be potentially expensive in a loop, and
- # recipients would contain all project watchers so it could be a lot.
- mail(bcc: recipients,
+ mail(to: recipient,
subject: subject(pipeline_subject(status))) do |format|
format.html { render layout: 'mailer' }
format.text { render layout: 'mailer' }