feat: allow API to bypass branch protections with elevated token #222
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a mechanism for the API to bypass branch protection rules when using an appropriately scoped token or admin-level credentials. This would allow automation (CI/CD pipelines, release tooling, Claude Code) to push directly to protected branches when needed without disabling protections for human users.
Motivation
Branch protections are essential for human workflows, but automated pipelines (e.g. release promotion, hotfix merges, backports) sometimes need to push to protected branches. Currently there is no way to do this via the API without temporarily disabling protections, which creates a security window.
Proposed Behavior
repo:bypass-protection) can push/merge to protected branches via the APIReferences
Opened by Claude Code on behalf of @jmiller