Keeping your reviews up to date is essential to maintain a coherent and
reliable development workflow. Mergify offers a granular approach with the
Conditional Triggers: Only dismiss reviews when specific conditions on the pull request are met.
Selective Removal: Choose to remove only approvals, only reviews from particular users, or only changes requested.
Targeted Dismissal: Dismiss reviews only from users that are in the requested reviewers list.
Event-driven: Opt to have the action run when a PR is pushed again or keep it active continuously.
There are multiple scenarios where you can use this action to automatically remove change requests or approvals.
Re-Review on PushSection titled Re-Review on Push
Automatically dismiss reviews when new commits are pushed to a PR targeting the main branch with a “re-review” label:
Team-based Review DismissalSection titled Team-based Review Dismissal
Retain the approvals if the author is from a trusted team, even if they update their code:
Specific User-based Review DismissalSection titled Specific User-based Review Dismissal
Dismiss reviews from specific users, which can be useful if you have a bot user or a particular reviewer whose comments might not be relevant upon code changes:
Dismiss Reviews When Request ReviewSection titled Dismiss Reviews When Request Review
When a user request a new review from a reviewer, asking for a review does not dismiss the current review from the reviewer. You can do that using this snippet: