summaryrefslogtreecommitdiff
path: root/lib/gitlab/note_data_builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/note_data_builder.rb')
-rw-r--r--lib/gitlab/note_data_builder.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/note_data_builder.rb b/lib/gitlab/note_data_builder.rb
index 71cf6a0d886..8bdc89a7751 100644
--- a/lib/gitlab/note_data_builder.rb
+++ b/lib/gitlab/note_data_builder.rb
@@ -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
@@ -59,8 +59,7 @@ module Gitlab
repository: project.hook_attrs.slice(:name, :url, :description, :homepage)
}
- base_data[:object_attributes][:url] =
- Gitlab::UrlBuilder.new(:note).build(note.id)
+ base_data[:object_attributes][:url] = Gitlab::UrlBuilder.build(note)
base_data
end