diff options
author | Sean McGivern <sean@gitlab.com> | 2017-03-30 12:29:52 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-03 13:59:48 +0100 |
commit | a1805cbcd55a28658049b42c12a87a50ab9ab977 (patch) | |
tree | aeab49a23df0bb52a8900e01a5c7348570f8bcef /app/services/notification_service.rb | |
parent | 2faf955c241ce7e99111f8fd0cae2e7ab6167e5a (diff) | |
download | gitlab-ce-a1805cbcd55a28658049b42c12a87a50ab9ab977.tar.gz |
Quiet pipeline emailsquiet-pipelines
1. Never send a pipeline email to anyone other than the user who created
the pipeline.
2. Only send pipeline success emails to people with the custom
notification setting for enabled. Watchers and participants will
never receive this.
3. When custom settings are unset (for new settings and legacy ones),
act as if failed_pipeline is set.
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 2c6f849259e..6b186263bd1 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -278,11 +278,11 @@ class NotificationService return unless mailer.respond_to?(email_template) - recipients ||= NotificationRecipientService.new(pipeline.project).build_recipients( + recipients ||= NotificationRecipientService.new(pipeline.project).build_pipeline_recipients( pipeline, pipeline.user, action: pipeline.status, - skip_current_user: false).map(&:notification_email) + ).map(&:notification_email) if recipients.any? mailer.public_send(email_template, pipeline, recipients).deliver_later |