diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-18 20:04:43 +0300 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-23 08:00:53 +0300 |
commit | 40d6d5e2d0123f1417bb5d3d1ead47bd525f8dac (patch) | |
tree | 1536ffad5f7c1a28ad2ca645a098a29b4bc2834d /app/services/notification_service.rb | |
parent | 17fe03078d003dc61a456da8d3e41e3e52ba4f54 (diff) |
Make pipeline emails respect group email setting
When a user's notification email is set for a group, we
should use that for pipeline emails
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 5aa804666f0..a55771ed538 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -418,7 +418,9 @@ class NotificationService [pipeline.user], :watch, custom_action: :"#{pipeline.status}_pipeline", target: pipeline - ).map(&:notification_email) + ).map do |user| + user.notification_email_for(pipeline.project.group) + end if recipients.any? mailer.public_send(email_template, pipeline, recipients).deliver_later |