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
path: root/lib
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-06-24 13:56:19 +0300
committerGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2019-06-25 19:24:16 +0300
commit760f806fd3dc934026bf3a955356b999128b71db (patch)
tree3398a500617703cb215f26eb3608c9590c8d33c0 /lib
parent2d545957031ac51d6994014850b72edc05779d1c (diff)
Merge branch 'fix-labels-in-hooks' into 'master'
Fix label serialisation in issue and note hooks Closes #63473 See merge request gitlab-org/gitlab-ce!29850 (cherry picked from commit 88c8d177f835983a0a47796529906c69376d159d) da470249 Fix label serialisation in issue and note hooks 4189ffe2 Added labels_hook_attrs method
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/data_builder/note.rb2
-rw-r--r--lib/gitlab/hook_data/issue_builder.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/note.rb b/lib/gitlab/data_builder/note.rb
index 16e62622ed4..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(&: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?
diff --git a/lib/gitlab/hook_data/issue_builder.rb b/lib/gitlab/hook_data/issue_builder.rb
index cfc9ebe4f92..e5f86ca02b5 100644
--- a/lib/gitlab/hook_data/issue_builder.rb
+++ b/lib/gitlab/hook_data/issue_builder.rb
@@ -45,7 +45,7 @@ module Gitlab
human_time_estimate: issue.human_time_estimate,
assignee_ids: issue.assignee_ids,
assignee_id: issue.assignee_ids.first, # This key is deprecated
- labels: issue.labels
+ labels: issue.labels_hook_attrs
}
issue.attributes.with_indifferent_access.slice(*self.class.safe_hook_attributes)