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
- Resolves #592358
- Related to #517909 (closed)
- Follows !205274 (merged)
How to set up and validate locally
- Configure a project or group webhook with Merge request events enabled.
- Open a merge request and assign a reviewer.
- As the reviewer, start a review by commenting on a diff line.
- Complete the review, select Request changes (or Reviewed), and submit.
- Confirm a
merge_requestwebhook fires withaction: "update"and achanges.reviewersentry showing the newstate. - Confirm that approving still fires only the
approvedwebhook (no duplicateupdateevent).
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.