Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-25 03:06:32 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-25 03:09:40 +0300
commitc1482943c4b77e2195fc4e64cc804302807335b9 (patch)
treecbe5e65b49b09500571813c03d5405d37467af1b /app
parent28097398c5087c3ffc7dc6cd63cd7f8304d3dae9 (diff)
Does not create a todo when commenting on commit or project snippet
Diffstat (limited to 'app')
-rw-r--r--app/services/notes/create_service.rb1
-rw-r--r--app/services/todo_service.rb4
2 files changed, 2 insertions, 3 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index b970439b921..2bb312bb252 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -13,6 +13,5 @@ module Notes
note
end
-
end
end
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