Skip to content

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

What does this MR do?

This is a fix for issue #29676 (closed).

Currently, webhooks triggered by merge requests will not include assignee changes in the data returned. This MR resolves this, the information will be included.

Details

As mentioned in #29676 (closed), some functionality in the merge request webhook was lost recently and changes in assignees are no longer reflected in the data returned.

"changes": {}

This MR would restore that functionality by including that information.

"changes":
  "assignees": {
    "previous": [],
    "current": [{
      "name": "Foo Bar",
      "username": "foobar",
      "avatar_url": "http:\/\/www.example.com\/my-avatar.jpg"
    }]
  }
}

While merge request webhooks previously included an "assignee" relation, when changes where made to allow multiple assignees in merge requests, this attribute was removed, see lib/gitlab/hook_data/merge_request_builder.rb. Restoring that relation, and changing it to be plural, resolved the issue, see L37 in lib/gitlab/hook_data/merge_request_builder.rb .

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

What risks does this change pose? How might it affect the quality/performance of the product?

As this change restores previous functionality, I cannot think of any risks.

What additional test coverage or changes to tests will be needed?

Additionally data was added to an existing test to ensure that assignee changes were reflected in webhooks, see L30 - L79 in spec/lib/gitlab/hook_data/issuable_builder_spec.rb

Will it require cross-browser testing?

No

Closes #29676 (closed)

Edited by Jesse Hall

Merge request reports