Skip to main content

Branch Protection: Allow Force Pushes Rule

The following rule type is available for allowing force pushes on branches.

stacklok/branch_protection_allow_force_pushes - Whether force pushes are allowed to the branch

Permit force pushes for all users with push access.

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_allow_force_pushes

Rule parameters

The stacklok/branch_protection_allow_force_pushes 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_allow_force_pushes rule supports the following options:

  • allow_force_pushes (boolean) - Permits force pushes to the protected branch by anyone with write access to the repository.