summaryrefslogtreecommitdiff
path: root/app/models/project_services/chat_notification_service.rb
diff options
context:
space:
mode:
authorChris Wilson <chris@chrisjwilson.com>2017-05-08 12:00:30 +1000
committerChris Wilson <chris@chrisjwilson.com>2017-05-08 15:55:02 +1000
commit52c8651a6caf5236ff173555164b676958540b9e (patch)
treea881b4466c0303f4b0d0e659041980452929b6c8 /app/models/project_services/chat_notification_service.rb
parent8b9cd3c072768ca810d2b33009e35d93a05e417f (diff)
downloadgitlab-ce-52c8651a6caf5236ff173555164b676958540b9e.tar.gz
Fix notify_only_default_branch check for Slack servicemrchrisw-fix-slack-notify
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/models/project_services/chat_notification_service.rb')
-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