List branch protections
list_branch_protectionsLists a repository's branch protection rules by owner/repo, showing required approvals, status checks, signed commits, and whether direct pushes are allowed so you can verify branch enforcement.
Instructions
List a repository's branch protection rules (owner/repo). Shows what each rule enforces — require_signed_commits, whether direct pushes are allowed, required approvals, status checks — for a branch name or glob. A branch matching no rule is unprotected, so an empty list means nothing is protected rather than a missing feature. require_signed_commits rejects pushes that are unsigned OR unverifiable, and is checked against the commits a push introduces rather than the branch's history, so enabling it does not invalidate what is already there. Allowlists of usernames, teams and deploy keys are omitted: they answer who may bypass a gate, not what is enforced. enable_force_push is Gitea-only and apply_to_admins Forgejo-only — absent means the forge does not report it, not false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner — user or organization. |