Unverified Commit 091b8a6e authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Rename Note#for_project_snippet? to #for_snippet?


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 1c7d20bef038
......@@ -311,7 +311,7 @@ def for_merge_request_diff_line?
for_merge_request? && for_diff_line?
end
def for_project_snippet?
def for_snippet?
noteable_type == "Snippet"
end
......
......@@ -123,7 +123,7 @@ def new_issuable(issuable, author)
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 @@ def build(note, user)
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 @@ def build_note_url(id)
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}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment