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:
authorSean McGivern <sean@gitlab.com>2019-06-19 16:17:08 +0300
committerSean McGivern <sean@gitlab.com>2019-06-20 15:50:28 +0300
commitda4702493d046e6de24c0a071b0162818e9d990c (patch)
tree78af36d3f26d4ce25060886cbd76ee09e390ee7e /lib/gitlab/hook_data
parent7277c9b0681186aea3e67ef7ec2dc2b597b5a98c (diff)
Fix label serialisation in issue and note hooks
We were not calling hook_attrs on the labels correctly. Specs were passing because the issues under test did not have any labels!
Diffstat (limited to 'lib/gitlab/hook_data')
-rw-r--r--lib/gitlab/hook_data/issue_builder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/hook_data/issue_builder.rb b/lib/gitlab/hook_data/issue_builder.rb
index cfc9ebe4f92..22ca23cde2a 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.map(&:hook_attrs)
}
issue.attributes.with_indifferent_access.slice(*self.class.safe_hook_attributes)