Send webhook when a merge request review is submitted

What does this MR do and why?

Send webhook when a merge request review is submitted

Submitting a review with "Request changes" or "Reviewed" updated the reviewer state but never fired a merge request webhook, so external integrations received no event for the action. Approvals and re-request review already emit webhooks, leaving submitted reviews as the remaining gap.

MergeRequests::UpdateReviewerStateService now captures the reviewer hook attributes before the update and executes the merge request hooks with an "update" action, reusing the reviewer-state diff already built for re-request review. Only the submitted-review states fire the webhook: approve and unapprove keep their own dedicated webhooks, and the automatic review_started/unreviewed transitions stay silent to avoid duplicate or noisy events.

Changelog: added

References

How to set up and validate locally

  1. Configure a project or group webhook with Merge request events enabled.
  2. Open a merge request and assign a reviewer.
  3. As the reviewer, start a review by commenting on a diff line.
  4. Complete the review, select Request changes (or Reviewed), and submit.
  5. Confirm a merge_request webhook fires with action: "update" and a changes.reviewers entry showing the new state.
  6. Confirm that approving still fires only the approved webhook (no duplicate update event).

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading