Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYarNayar <YarTheGreat@gmail.com>2017-07-25 14:56:09 +0300
committerSean McGivern <sean@gitlab.com>2018-03-26 15:24:52 +0300
commit99b01e23598e6b0b2bcae891939ea28c67f7b2e9 (patch)
treec32d351419cd399dcb104eac54563b7028bbd1d8 /app/models/notification_setting.rb
parentbb9d360c0a7daed6aa08a0635e084c314c2c8b3e (diff)
Send notification emails when push to a merge request
Closes #23460
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index 245f8dddcf9..f6d9b0215fc 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -33,6 +33,7 @@ class NotificationSetting < ActiveRecord::Base
:close_issue,
:reassign_issue,
:new_merge_request,
+ :push_to_merge_request,
:reopen_merge_request,
:close_merge_request,
:reassign_merge_request,
@@ -41,10 +42,14 @@ class NotificationSetting < ActiveRecord::Base
:success_pipeline
].freeze
- EXCLUDED_WATCHER_EVENTS = [
+ EXCLUDED_PARTICIPATING_EVENTS = [
:success_pipeline
].freeze
+ EXCLUDED_WATCHER_EVENTS = [
+ :push_to_merge_request
+ ].push(*EXCLUDED_PARTICIPATING_EVENTS).freeze
+
def self.find_or_create_for(source)
setting = find_or_initialize_by(source: source)