Codifies the branch protection applied to main on 2026-04-16: no
direct pushes, required checks = CI / {lint,test,validate-json}*,
zero approvals (2-person team), admin bypass left on for emergencies.
Script is idempotent (create-or-patch) and reads its token from
\$FORGEJO_TOKEN or the local git remote URL as a fallback, so a
clean re-run just reconciles the rule with branch-protection.json.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
291 B
JSON
13 lines
291 B
JSON
{
|
|
"enable_push": false,
|
|
"enable_status_check": true,
|
|
"status_check_contexts": [
|
|
"CI / lint*",
|
|
"CI / test*",
|
|
"CI / validate-json*"
|
|
],
|
|
"required_approvals": 0,
|
|
"block_on_rejected_reviews": false,
|
|
"block_on_outdated_branch": false,
|
|
"require_signed_commits": false
|
|
}
|