diff options
author | Stan Hu <stanhu@gmail.com> | 2015-03-05 10:38:23 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-03-06 06:54:00 -0800 |
commit | 7e204cf389346d23e71bc4c2fa9e14cf82a7ed2e (patch) | |
tree | a0d85dcfb27c34aaede8c7183c9482248d6bee7f /app/models/project_services/slack_service.rb | |
parent | 8b53d9efe648f10e0572c2d8017489d0d3bb4755 (diff) | |
download | gitlab-ce-7e204cf389346d23e71bc4c2fa9e14cf82a7ed2e.tar.gz |
Added comment notification events to HipChat and Slack services.
Supports four different event types all bundled under the "note" event type:
- comments on a commit
- comments on an issue
- comments on a merge request
- comments on a code snippet
Diffstat (limited to 'app/models/project_services/slack_service.rb')
-rw-r--r-- | app/models/project_services/slack_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index c529a784017..a58840116f4 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -15,6 +15,7 @@ # issues_events :boolean default(TRUE) # merge_requests_events :boolean default(TRUE) # tag_push_events :boolean default(TRUE) +# note_events :boolean default(TRUE), not null # class SlackService < Service @@ -43,7 +44,7 @@ class SlackService < Service end def supported_events - %w(push issue merge_request) + %w(push issue merge_request note) end def execute(data) @@ -69,6 +70,8 @@ class SlackService < Service IssueMessage.new(data) unless is_update?(data) when "merge_request" MergeMessage.new(data) unless is_update?(data) + when "note" + NoteMessage.new(data) end opt = {} @@ -99,3 +102,4 @@ end require "slack_service/issue_message" require "slack_service/push_message" require "slack_service/merge_message" +require "slack_service/note_message" |