Commit d2750875 authored by Nick Thomas's avatar Nick Thomas

Merge branch '29676-mr-webhooks-missing-assignee-changes' into 'master'

Fix for #29676, MR webhooks will now show changes in assignees.

Closes #29676

See merge request gitlab-org/gitlab!16812
parents 8c1859a1 5031d80e
---
title: Restores data for assignee changes in merge request webhooks.
merge_request: 16812
author: Jesse Hall @jessehall3
type: fixed
...@@ -34,6 +34,7 @@ module Gitlab ...@@ -34,6 +34,7 @@ module Gitlab
end end
SAFE_HOOK_RELATIONS = %i[ SAFE_HOOK_RELATIONS = %i[
assignees
labels labels
total_time_spent total_time_spent
].freeze ].freeze
......
...@@ -42,7 +42,15 @@ describe Gitlab::HookData::IssuableBuilder do ...@@ -42,7 +42,15 @@ describe Gitlab::HookData::IssuableBuilder do
[{ id: 1, title: 'foo' }], [{ id: 1, title: 'foo' }],
[{ id: 1, title: 'foo' }, { id: 2, title: 'bar' }] [{ id: 1, title: 'foo' }, { id: 2, title: 'bar' }]
], ],
total_time_spent: [1, 2] total_time_spent: [1, 2],
assignees: [
[],
[{
name: "Foo Bar",
username: "foobar",
avatar_url: "http://www.example.com/my-avatar.jpg"
}]
]
} }
end end
let(:data) { builder.build(user: user, changes: changes) } let(:data) { builder.build(user: user, changes: changes) }
...@@ -58,6 +66,14 @@ describe Gitlab::HookData::IssuableBuilder do ...@@ -58,6 +66,14 @@ describe Gitlab::HookData::IssuableBuilder do
total_time_spent: { total_time_spent: {
previous: 1, previous: 1,
current: 2 current: 2
},
assignees: {
previous: [],
current: [{
name: "Foo Bar",
username: "foobar",
avatar_url: "http://www.example.com/my-avatar.jpg"
}]
} }
})) }))
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment