Skip to content

Publish ApprovalsResetEvent when approvals are reset on push

Patrick Bajao requested to merge 382087-approvals-reset-event-subscription into master

What does this MR do and why?

This utilizes the MergeRequests::ApprovalsResetEvent which will create a system note about approvals being reset when published.

We currently only want to do this when a new push comes in if project is set to reset approvals on push.

MR acceptance checklist

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

How to set up and validate locally

  1. Set project to remove all approvals or remove approvals by Code Owners if their files changed when a new commit is added.
  2. Create a MR.
  3. Approve MR.
  4. Push changes to MR.
  5. Wait for a couple of seconds. Approvals reset is async and delayed for 10s.
  6. Once approvals are reset, confirm that a system note saying something like revoked approvals from @approver by pushing to the branch is present on the MR overview page.

Related to #382087 (closed)

Merge request reports