dismiss_reviews๐
The dismiss_reviews
action removes reviews done by collaborators when the
pull request is updated. This is especially useful to make sure that a review
does not stay when the branch is updated (e.g., new commits are added or the
branch is rebased).
Options๐
Key Name |
Value Type |
Default |
Value Description |
---|---|---|---|
|
Boolean or list of string |
|
If set to |
|
Boolean or list of string |
|
If set to |
|
|
The message to post when dismissing the review. |
|
|
|
|
If set to |
Examples๐
๐ฅถ Removing Stale Reviews๐
When a pull request is updated, GitHub does not remove the (possibly) outdated reviews approvals or changes request. It's a good idea to remove them as soon as the pull request gets updated with new commits.
pull_request_rules:
- name: remove outdated reviews
conditions:
- base=main
actions:
dismiss_reviews:
You could also only dismiss the outdated reviews if the author is not a member of a particular team. This allows to keep the approval if the author is trusted, even if they update their code:
pull_request_rules:
- name: remove outdated reviews for non trusted authors
conditions:
- base=main
- [email protected]
actions:
dismiss_reviews: