summaryrefslogtreecommitdiff
path: root/app/services/todo_service.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-24 21:06:32 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-24 21:09:40 -0300
commitc1482943c4b77e2195fc4e64cc804302807335b9 (patch)
treecbe5e65b49b09500571813c03d5405d37467af1b /app/services/todo_service.rb
parent28097398c5087c3ffc7dc6cd63cd7f8304d3dae9 (diff)
downloadgitlab-ce-c1482943c4b77e2195fc4e64cc804302807335b9.tar.gz
Does not create a todo when commenting on commit or project snippet
Diffstat (limited to 'app/services/todo_service.rb')
-rw-r--r--app/services/todo_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb
index dc270602ebc..4392e2d17fe 100644
--- a/app/services/todo_service.rb
+++ b/app/services/todo_service.rb
@@ -130,8 +130,8 @@ class TodoService
end
def handle_note(note, author)
- # Skip system notes, like status changes and cross-references
- return if note.system
+ # Skip system notes, notes on commit, and notes on project snippet
+ return if note.system? || ['Commit', 'Snippet'].include?(note.noteable_type)
project = note.project
target = note.noteable