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
path: root/app
diff options
context:
space:
mode:
authorChris Wilson <chris@chrisjwilson.com>2017-05-08 05:00:30 +0300
committerChris Wilson <chris@chrisjwilson.com>2017-05-08 08:55:02 +0300
commit52c8651a6caf5236ff173555164b676958540b9e (patch)
treea881b4466c0303f4b0d0e659041980452929b6c8 /app
parent8b9cd3c072768ca810d2b33009e35d93a05e417f (diff)
Fix notify_only_default_branch check for Slack service
The notify_only_default_branch property is using boolean_accessor this means we need to check it using a question methods. Also add specs for disabling this option.
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/chat_notification_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb
index fa782c6fbb7..6464bf3f4a4 100644
--- a/app/models/project_services/chat_notification_service.rb
+++ b/app/models/project_services/chat_notification_service.rb
@@ -150,7 +150,7 @@ class ChatNotificationService < Service
def notify_for_ref?(data)
return true if data[:object_attributes][:tag]
- return true unless notify_only_default_branch
+ return true unless notify_only_default_branch?
data[:object_attributes][:ref] == project.default_branch
end