Skip to content

fix: Enable branch protection rulesets for .github and bmad-bgreat-suite#66

Closed
claude[bot] wants to merge 1 commit intomainfrom
claude/issue-28-20260406-0341
Closed

fix: Enable branch protection rulesets for .github and bmad-bgreat-suite#66
claude[bot] wants to merge 1 commit intomainfrom
claude/issue-28-20260406-0341

Conversation

@claude
Copy link
Copy Markdown
Contributor

@claude claude Bot commented Apr 6, 2026

Summary

  • Adds scripts/setup-branch-protection.sh — creates/idempotently updates the pr-quality and code-quality rulesets on repos missing branch protection
  • Updates standards/github-settings.md to document .github as a deviation and adds a "Remediating Missing Rulesets" section with usage instructions

Changes

scripts/setup-branch-protection.sh

New script that uses the GitHub Rulesets API to apply standard branch protection to .github and bmad-bgreat-suite:

  • pr-quality: 1 required review, stale review dismissal, code owner review, last-push approval, thread resolution, squash-only, no force-push, no deletion
  • code-quality (strict — branch must be up-to-date):
    • .github: Lint, ShellCheck, Agent Security Scan, SonarCloud, claude
    • bmad-bgreat-suite: SonarCloud, Analyze, claude

Supports --dry-run and is idempotent (updates existing rulesets rather than duplicating).

standards/github-settings.md

  • Added .github to the compliance deviations table
  • Added "Remediating Missing Rulesets" section with --dry-run and apply commands

After Merging

An admin runs:

# Preview first
DRY_RUN=true GH_TOKEN=<admin-pat> bash scripts/setup-branch-protection.sh --default

# Apply
GH_TOKEN=<admin-pat> bash scripts/setup-branch-protection.sh --default

Note: Verify that check names in the script match actual CI job names in bmad-bgreat-suite before applying.

Closes #28

Generated with Claude Code

Add scripts/setup-branch-protection.sh to create/update the pr-quality
and code-quality rulesets on repos that are missing branch protection.
Update standards/github-settings.md to document the .github repo deviation
and add remediation instructions.

Closes #28

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

@don-petry
Copy link
Copy Markdown
Contributor

Closing — superseded by #71 (apply-rulesets.sh with dynamic check detection). This PR's hardcoded per-repo check names are fragile compared to #71's approach. The standards deviation table update is also stale after repo settings were bulk-remediated.

@don-petry don-petry closed this Apr 6, 2026
@don-petry don-petry deleted the claude/issue-28-20260406-0341 branch April 6, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Enable branch protection on .github and bmad-bgreat-suite

1 participant