summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-05 19:31:11 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-05 19:53:56 +0800
commitce7c632f5098a53b0977ec8531a9f53e61ddbe8d (patch)
tree2b17a68f0837070b8bec771cd24a78c1ef6151da /app/services/notification_service.rb
parent365cdd8fe0d107257ba5af47b80b66f08217b6bc (diff)
downloadgitlab-ce-ce7c632f5098a53b0977ec8531a9f53e61ddbe8d.tar.gz
Introduce EXCLUDED_WATCHER_EVENTS to exclude eventsremove-successful-pipeline-emails-for-now
for watchers. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8176#note_20920905
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 75277d3ac12..c3b61e68eab 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -592,8 +592,7 @@ class NotificationService
recipients = target.participants(current_user)
- # TODO: CLEAN ME UP!
- unless custom_action == :success_pipeline
+ unless NotificationSetting::EXCLUDED_WATCHER_EVENTS.include?(custom_action)
recipients = add_project_watchers(recipients, project)
end