summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-22 01:11:59 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-22 01:11:59 +0800
commit383b0e9686a5f7a98cd21e6c5a7c9974f9ea3b80 (patch)
treefc5950638e7a5feb8938d51ece0df7d3efee0b00 /app/services/notification_service.rb
parentf388fceb4cc64d67b95e45cdbe77c9907803d6f1 (diff)
downloadgitlab-ce-383b0e9686a5f7a98cd21e6c5a7c9974f9ea3b80.tar.gz
Well pusher's privilege for read_build could be removed
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index f48255b2e6c..6697840cc26 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -323,7 +323,9 @@ class NotificationService
nil, # The acting user, who won't be added to recipients
action: pipeline.status).map(&:notification_email)
- mailer.public_send(email_template, pipeline, recipients).deliver_later
+ if recipients.any?
+ mailer.public_send(email_template, pipeline, recipients).deliver_later
+ end
end
protected