diff --git a/scripts/apply-repo-settings.sh b/scripts/apply-repo-settings.sh index 114b931..3d25b49 100644 --- a/scripts/apply-repo-settings.sh +++ b/scripts/apply-repo-settings.sh @@ -15,11 +15,18 @@ # DRY_RUN=true GH_TOKEN= ./scripts/apply-repo-settings.sh # # Requirements: +# - Bash 4+ (uses associative arrays — macOS ships Bash 3.2; use GitHub Actions or brew install bash) # - GH_TOKEN must have admin:repo scope (or be an admin of the org) # - gh CLI must be installed set -euo pipefail +if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then + echo "[ERROR] Bash 4+ required (associative arrays). Found: $BASH_VERSION" >&2 + echo " On macOS: brew install bash, then run with /opt/homebrew/bin/bash" >&2 + exit 1 +fi + ORG="petry-projects" DRY_RUN="${DRY_RUN:-false}" diff --git a/standards/github-settings.md b/standards/github-settings.md index ef8507f..35cb408 100644 --- a/standards/github-settings.md +++ b/standards/github-settings.md @@ -243,20 +243,25 @@ When creating a new repository in `petry-projects`: ## Current Compliance Status -Settings deviations from the standard documented above: - -| Repository | Deviations | -|------------|-----------| -| **bmad-bgreat-suite** | No rulesets, `delete_branch_on_merge: false`, `allow_auto_merge: false`, `has_wiki: true`, `has_discussions: false` | -| **ContentTwin** | `allow_auto_merge: false`, `has_discussions: false` | -| **google-app-scripts** | `allow_merge_commit: false`, `allow_rebase_merge: false` (stricter than standard), `has_discussions: false` | -| **broodly** | `has_wiki: true`, `has_discussions: false` | -| **markets** | `has_wiki: true`, `has_discussions: false` | -| **TalkTerm** | `has_wiki: true`, `has_discussions: false` | - -> **Migration note:** All repos currently use classic branch protection. These -> should be migrated to rulesets per the standard above. Classic rules should -> be removed after rulesets are verified. +**Repository settings:** All 7 repos are fully compliant as of 2026-04-05 +(remediated via `scripts/apply-repo-settings.sh --all`). + +**Ruleset status:** + +| Repository | `pr-quality` | `code-quality` | Notes | +|------------|:---:|:---:|-------| +| **.github** | — | — | No rulesets yet | +| **bmad-bgreat-suite** | — | — | No rulesets yet | +| **ContentTwin** | ✅ | — | | +| **broodly** | ✅ | — | | +| **TalkTerm** | ✅ | — | | +| **markets** | ✅ | — | | +| **google-app-scripts** | — | — | Has non-standard `protect-branches` ruleset — migrate to `pr-quality` | + +> **Next steps:** Run `scripts/apply-rulesets.sh --all` to create `code-quality` +> rulesets across all repos. The `pr-quality` ruleset support needs to be added +> to `apply-rulesets.sh` (currently only handles `code-quality`). +> Migrate `google-app-scripts` from its legacy `protect-branches` ruleset. ---