GitHub branch rules are not stored in git; a repo admin applies them in the GitHub UI. Configure main so merges only land when Quality checks is green.
-
Open Settings → Rules → Rulesets (or Branches → Branch protection rules on older UIs).
-
Target
main(and optionally **release/**** if you add that pattern later). -
Enable:
-
Require a pull request before merging
Require approvals as your team prefers (often 1 for small teams). -
Require status checks to pass
Require Quality checks /quality(the workflow job that runsbun run release:gate). Leave “Require branches to be up to date before merging” on if you want linear history. -
Require conversation resolution before merging (optional but useful).
-
-
Optionally restrict who can push to
main(admins only, or disable force-push). -
Save the ruleset.
After this, contributors cannot merge PRs until lint, format check, Changesets status validation, tests, all checked-in config validation, auth-backed public config validation, automated tiny gateway inference (bun run smoke:tiny), public safety (bun run smoke:tiny:public), async queue (bun run smoke:tiny:async), and public async queue (bun run smoke:tiny:public-async) smokes, public deploy bundle smoke rendering, public deploy package-script coverage, Bun-first package, workflow, runtime-doc coverage, Markdown local-link validation, public model staging smoke rendering, and Bun pack smoke checks match what bun run release:gate runs locally.