View as Markdown

Dismiss Reviews

Dismiss previous reviews on a pull request.


The dismiss_reviews action allows Mergify to automatically dismiss approving reviews, reviews requesting changes, or both.

approvedlist of string, boolean or from_requested_reviewers·defaulttrue#

If set to true, all the approving reviews will be removed when the pull request is updated. If set to false, nothing will be done. If set to a list, each item should be the GitHub login of a user whose review will be removed. If set to from_requested_reviewers, the list of requested reviewers will be used to get whose review will be removed.

changes_requestedlist of string, boolean or from_requested_reviewers·defaulttrue#

If set to true, all the reviews requesting changes will be removed when the pull request is updated. If set to false, nothing will be done. If set to a list, each item should be the GitHub login of a user whose review will be removed. If set to from_requested_reviewers, the list of requested reviewers will be used to get whose review will be removed.

messagestring or null·defaultnull#

Message to use when dismissing reviews.

whensynchronize or always·defaultsynchronize#

If set to synchronize, the action dismisses the reviews a push to the pull request made stale: the ones submitted before it, and the ones submitted later on a commit it replaced. Otherwise, it will run each time the rule matches.

when decides what counts as a trigger. With the default synchronize, the action runs when someone pushes new commits, and when a review arrives on a commit such a push replaced. It dismisses the reviews submitted before the push, and those given later on a commit it replaced, such as an approval from a pull request page opened before the push. A push Mergify itself made, such as an update or a rebase, is not a trigger. Set when to always to dismiss every time the rule’s conditions match, whether or not the commits changed.

Dismiss approvals when new commits are pushed

Section titled Dismiss approvals when new commits are pushed

Keep approvals fresh by removing them whenever new commits are pushed, while leaving change requests in place.

.mergify.ymlyaml
pull_request_rules:
- name: dismiss stale approvals
conditions:
- base = main
actions:
dismiss_reviews:
approved: true
changes_requested: false

Was this page helpful?