summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-06 16:21:23 +0000
committerDouwe Maan <douwe@gitlab.com>2015-03-06 16:21:23 +0000
commit76802012e62a70bd040ec5cb8efa7e357dda0eee (patch)
treea0d85dcfb27c34aaede8c7183c9482248d6bee7f /app/models/snippet.rb
parent8b53d9efe648f10e0572c2d8017489d0d3bb4755 (diff)
parent7e204cf389346d23e71bc4c2fa9e14cf82a7ed2e (diff)
downloadgitlab-ce-76802012e62a70bd040ec5cb8efa7e357dda0eee.tar.gz
Merge branch 'add-notes-notifications-to-services' into 'master'
Add notes notifications to services This merge request builds on top of a few other merge requests: * https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/237 * https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/350 The purpose of this merge request is to add service notification support when a user comments on one of the following: * commits * issues * merge requests * code snippets Currently HipChat and Slack are only supported. The admin can select which events to toggle on or off. ## Questions All note events are bundled under the `note` event type. Is this okay, or does it make more sense to have individual events and/or change the `object_type` attribute in the hook data? Also, does it look better to link the entire `merge request #X` as opposed to just `#X`? I like the former. ## Before ![Screen Shot 2015-03-01 at 3.05.56 PM](https://gitlab.com/uploads/stanhu/gitlab-ce/8ae828e652/Screen_Shot_2015-03-01_at_3.05.56_PM.png) ## After ![Screen Shot 2015-03-06 at 6.24.40 AM](https://gitlab.com/uploads/gitlab-org/gitlab-ce/7b866ae02b/Screen_Shot_2015-03-06_at_6.24.40_AM.png) ### Slack ![Screen Shot 2015-03-01 at 2.59.00 PM](https://gitlab.com/uploads/stanhu/gitlab-ce/0147c2dc38/Screen_Shot_2015-03-01_at_2.59.00_PM.png) ### HipChat ![Screen Shot 2015-03-01 at 2.59.19 PM](https://gitlab.com/uploads/stanhu/gitlab-ce/14e78fc61c/Screen_Shot_2015-03-01_at_2.59.19_PM.png) See merge request !358
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 82c1ab94446..3fb2ec1d66c 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -59,6 +59,10 @@ class Snippet < ActiveRecord::Base
content
end
+ def hook_attrs
+ attributes
+ end
+
def size
0
end