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
end
SAFE_HOOK_RELATIONS = %i[
assignees
labels
total_time_spent
].freeze
......
......@@ -42,7 +42,15 @@ describe Gitlab::HookData::IssuableBuilder do
[{ id: 1, title: 'foo' }],
[{ 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
let(:data) { builder.build(user: user, changes: changes) }
......@@ -58,6 +66,14 @@ describe Gitlab::HookData::IssuableBuilder do
total_time_spent: {
previous: 1,
current: 2
},
assignees: {
previous: [],
current: [{
name: "Foo Bar",
username: "foobar",
avatar_url: "http://www.example.com/my-avatar.jpg"
}]
}
}))
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