Add webhook notifications for merge request re-request review

What does this MR do and why?

Add webhook notifications for merge request re-request review

This change enhances webhook payloads for merge requests to properly track reviewer state changes when a reviewer is re-requested. It adds the 're_requested' attribute to reviewer data in webhook payloads and refactors the reviewer hook data generation code for better maintainability.

The 're_requested' attribute is always included in reviewer hook data:

  • Set to true for the specific reviewer being re-requested
  • Set to false for all other reviewers
  • Ensures webhook consumers can identify which reviewer was re-requested

Changelog: added

References

Resolves: #420126 (closed) Supports: #517909 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Setup project with webhook following this guide: https://docs.gitlab.com/development/webhooks/#qaing-changes.
  2. Add a reviewer to any merge request
  3. Notice the webhook payload when the reviewer is added now includes state
  4. Use the reviewer to complete a review and submit the review
  5. Re-request a review from that reviewer
  6. Notice the webhook payload now contains changes to the reviewer state and that a re_requested: true in the payload

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.

Edited by Kai Armstrong

Merge request reports

Loading