Rename Note#for_project_snippet? to #for_snippet?
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
0af8587d88
commit
091b8a6ede
4 changed files with 4 additions and 4 deletions
|
@ -311,7 +311,7 @@ class Note < ActiveRecord::Base
|
|||
for_merge_request? && for_diff_line?
|
||||
end
|
||||
|
||||
def for_project_snippet?
|
||||
def for_snippet?
|
||||
noteable_type == "Snippet"
|
||||
end
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class TodoService
|
|||
|
||||
def handle_note(note, author)
|
||||
# Skip system notes, and notes on project snippet
|
||||
return if note.system? || note.for_project_snippet?
|
||||
return if note.system? || note.for_snippet?
|
||||
|
||||
project = note.project
|
||||
target = note.noteable
|
||||
|
|
|
@ -41,7 +41,7 @@ module Gitlab
|
|||
data[:issue] = note.noteable.hook_attrs
|
||||
elsif note.for_merge_request?
|
||||
data[:merge_request] = note.noteable.hook_attrs
|
||||
elsif note.for_project_snippet?
|
||||
elsif note.for_snippet?
|
||||
data[:snippet] = note.noteable.hook_attrs
|
||||
end
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ module Gitlab
|
|||
merge_request = MergeRequest.find(note.noteable_id)
|
||||
merge_request_url(merge_request,
|
||||
anchor: "note_#{note.id}")
|
||||
elsif note.for_project_snippet?
|
||||
elsif note.for_snippet?
|
||||
snippet = Snippet.find(note.noteable_id)
|
||||
project_snippet_url(snippet,
|
||||
anchor: "note_#{note.id}")
|
||||
|
|
Loading…
Reference in a new issue