summaryrefslogtreecommitdiff
path: root/app/models/notification_setting.rb
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-06-05 15:37:08 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-06-06 01:34:25 +0800
commita1684d1440c7a875ded0d8616e83932aa64f7b4d (patch)
tree1ec66a9928f2b01e8b6229a8ac4ccb7182f0e651 /app/models/notification_setting.rb
parentf7ec4df5f07335730018e67ce4ef23560d7225b6 (diff)
downloadgitlab-ce-a1684d1440c7a875ded0d8616e83932aa64f7b4d.tar.gz
Simplify notification check for participatingsimplify-pipeline-notification-check
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index 61af5c09ae4..8306b11a7b6 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -54,14 +54,11 @@ class NotificationSetting < ApplicationRecord
self.class.email_events(source)
end
- EXCLUDED_PARTICIPATING_EVENTS = [
- :success_pipeline
- ].freeze
-
EXCLUDED_WATCHER_EVENTS = [
:push_to_merge_request,
- :issue_due
- ].push(*EXCLUDED_PARTICIPATING_EVENTS).freeze
+ :issue_due,
+ :success_pipeline
+ ].freeze
def self.find_or_create_for(source)
setting = find_or_initialize_by(source: source)