From c0b69367ec4d02b5965cd34074511dd5c2c06b27 Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 6 Apr 2026 04:49:34 -0700 Subject: [PATCH 1/2] docs: update compliance status and add bash 4+ requirement - Update Current Compliance Status table: all repo settings are now fully compliant after bulk remediation; document remaining ruleset gaps - Add Bash 4+ requirement note to apply-repo-settings.sh (uses associative arrays, incompatible with macOS default Bash 3.2) Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/apply-repo-settings.sh | 1 + standards/github-settings.md | 33 +++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/apply-repo-settings.sh b/scripts/apply-repo-settings.sh index 114b931..a2a50e5 100644 --- a/scripts/apply-repo-settings.sh +++ b/scripts/apply-repo-settings.sh @@ -15,6 +15,7 @@ # 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 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. --- From bd8155b5779abad5d5ff88cbf2b6ca87598cced3 Mon Sep 17 00:00:00 2001 From: DJ Date: Mon, 6 Apr 2026 05:55:49 -0700 Subject: [PATCH 2/2] fix: add bash 4+ runtime check to apply-repo-settings.sh Addresses Copilot review: fail fast with actionable message instead of cryptic declare -A error on macOS Bash 3.2. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/apply-repo-settings.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/apply-repo-settings.sh b/scripts/apply-repo-settings.sh index a2a50e5..3d25b49 100644 --- a/scripts/apply-repo-settings.sh +++ b/scripts/apply-repo-settings.sh @@ -21,6 +21,12 @@ 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}"