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
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-06-24 12:51:34 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2019-06-24 12:51:34 +0300
commit4189ffe2142e0a0969a3f28ec55e069c3b5abb9f (patch)
treeabb30e42e8317a53dfe72c5cfaa7ddfd28ce47ae /lib/gitlab/data_builder
parentda4702493d046e6de24c0a071b0162818e9d990c (diff)
Added labels_hook_attrs method
Based on review comment fetching labels hook_attrs is now wrapped in an issue's model method.
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r--lib/gitlab/data_builder/note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/note.rb b/lib/gitlab/data_builder/note.rb
index 9a2fe4e9abf..2c4ef73a688 100644
--- a/lib/gitlab/data_builder/note.rb
+++ b/lib/gitlab/data_builder/note.rb
@@ -44,7 +44,7 @@ module Gitlab
data[:commit] = build_data_for_commit(project, user, note)
elsif note.for_issue?
data[:issue] = note.noteable.hook_attrs
- data[:issue][:labels] = note.noteable.labels.map(&:hook_attrs)
+ data[:issue][:labels] = note.noteable.labels_hook_attrs
elsif note.for_merge_request?
data[:merge_request] = note.noteable.hook_attrs
elsif note.for_snippet?