diff options
author | Sean McGivern <sean@gitlab.com> | 2019-06-19 16:17:08 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-06-20 15:50:28 +0300 |
commit | da4702493d046e6de24c0a071b0162818e9d990c (patch) | |
tree | 78af36d3f26d4ce25060886cbd76ee09e390ee7e /lib/gitlab/data_builder | |
parent | 7277c9b0681186aea3e67ef7ec2dc2b597b5a98c (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/data_builder')
-rw-r--r-- | lib/gitlab/data_builder/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/note.rb b/lib/gitlab/data_builder/note.rb index 16e62622ed4..9a2fe4e9abf 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.map(&:hook_attrs) elsif note.for_merge_request? data[:merge_request] = note.noteable.hook_attrs elsif note.for_snippet? |