Publish ApprovalsResetEvent when approvals are reset on push
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
- Set project to remove all approvals or remove approvals by Code Owners if their files changed when a new commit is added.
- Create a MR.
- Approve MR.
- Push changes to MR.
- Wait for a couple of seconds. Approvals reset is async and delayed for 10s.
- 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)