BigW Consortium Gitlab

Rename Note#for_project_snippet? to #for_snippet?

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent 0af8587d
......@@ -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}")
......
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