Problem
scripts/apply-rulesets.sh currently only creates/updates the code-quality ruleset (required status checks). It does not support the pr-quality ruleset (branch protection, review requirements, squash-only merges).
This means pr-quality rulesets must be created manually or via a separate script, and repos missing them (.github, bmad-bgreat-suite, google-app-scripts) can't be remediated with a single --all command.
Expected
Add pr-quality ruleset creation to apply-rulesets.sh so that running:
GH_TOKEN=<token> ./scripts/apply-rulesets.sh --all
creates/updates both code-quality and pr-quality rulesets across all org repos.
Ruleset spec (from github-settings.md)
| Setting |
Value |
| Target branches |
Default branch (~DEFAULT_BRANCH) |
| Enforcement |
Active |
| Required approving reviews |
1 |
| Dismiss stale reviews on push |
Yes |
| Required review thread resolution |
Yes |
| Require code owner review |
Yes |
| Require last push approval |
Yes |
| Squash-only merges |
Enforced via required_linear_history |
| Allow force pushes |
No |
| Allow deletions |
No |
Context
PR #65 had a working implementation but was closed as superseded by #71 (which only handled code-quality). The pr-quality payload from #65 can be ported into the existing apply-rulesets.sh.
Related issues: #48 (missing-pr-quality for .github), bmad-bgreat-suite#26
Problem
scripts/apply-rulesets.shcurrently only creates/updates thecode-qualityruleset (required status checks). It does not support thepr-qualityruleset (branch protection, review requirements, squash-only merges).This means
pr-qualityrulesets must be created manually or via a separate script, and repos missing them (.github,bmad-bgreat-suite,google-app-scripts) can't be remediated with a single--allcommand.Expected
Add
pr-qualityruleset creation toapply-rulesets.shso that running:creates/updates both
code-qualityandpr-qualityrulesets across all org repos.Ruleset spec (from github-settings.md)
~DEFAULT_BRANCH)required_linear_historyContext
PR #65 had a working implementation but was closed as superseded by #71 (which only handled code-quality). The pr-quality payload from #65 can be ported into the existing
apply-rulesets.sh.Related issues: #48 (missing-pr-quality for .github), bmad-bgreat-suite#26