Skip to main content

Branch Protection: Dismiss Stale Reviews on PRs Rule

The following rule type is available for dismissing stale reviews on PRs.

stacklok/branch_protection_require_pull_request_dismiss_stale_reviews - Require that new pushes to the branch dismiss old reviews

New reviewable commits pushed to a matching branch will dismiss pull request review approvals.

For more information, see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule

Entity

  • repository

Type

  • stacklok/branch_protection_require_pull_request_dismiss_stale_reviews

Rule parameters

The stacklok/branch_protection_require_pull_request_dismiss_stale_reviews rule supports the following parameters:

  • branch (string) - The name of the branch to check. If left empty, the default branch will be used.

Rule definition options

The stacklok/branch_protection_require_pull_request_dismiss_stale_reviews rule supports the following options:

  • dismiss_stale_reviews (boolean) - Set to true to dismiss approving reviews when someone pushes a new commit.