sassy_ghq_protect
Apply a standard branch-protection preset to any GitHub branch, blocking force pushes and deletions while enforcing rules on admins. Returns the protection result as JSON.
Instructions
Mutating: applies a fixed branch-protection preset to branch (default main) in owner/repo. The preset blocks force pushes and deletions and enforces the rules on admins, but sets no required status checks and no required PR reviews. Returns the protection result as JSON. Requires a GitHub token (GITHUB_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN). Use for the quick standard lock-down of main; for custom rules (required reviews, approval counts, status checks, allowing force pushes) use the github_full tool sassy_gh_protect_branch instead, and to inspect or remove protection use sassy_gh_get_branch_protection or sassy_gh_remove_branch_protection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| owner | Yes | ||
| branch | No | main |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |