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/note.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/note.rb')
-rw-r--r-- | app/models/note.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index e6c258ffbe9..b19d7b0f256 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -308,6 +308,10 @@ class Note < ActiveRecord::Base end end + def hook_attrs + attributes + end + def set_diff # First lets find notes with same diff # before iterating over all mr diffs @@ -466,6 +470,10 @@ class Note < ActiveRecord::Base for_merge_request? && for_diff_line? end + def for_project_snippet? + noteable_type == "Snippet" + end + # override to return commits, which are not active record def noteable if for_commit? |