fix(governance): restrict direct pushes to trade/maintainers team#86
Conversation
All three branches now require pushes to come from the trade/maintainers team. Removes the unused csv_to_json_array and build_restrictions_json functions. verify-governance.sh now checks push restriction team slug.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughGovernance scripts now hardcode a fixed ChangesGovernance Configuration Hardening
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/github/verify-governance.sh`:
- Around line 116-121: The current check only inspects the first team slug via
push_team and can miss extra allowed principals; update the verification to (1)
collect all team slugs (e.g. via jq '.restrictions.teams[]?.slug') and assert
that the only team present is "maintainers" (no other team slugs), and (2)
ensure that .restrictions.users and .restrictions.apps are empty; replace the
single push_team/head check with jq-based checks that test membership and counts
(or compare arrays) and return failure if teams contain anything besides
"maintainers" or if users/apps arrays are non-empty.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2911f81e-12d5-497e-beae-529ccc410d8f
📒 Files selected for processing (2)
scripts/github/apply-governance.shscripts/github/verify-governance.sh
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1b8944316
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Restricts direct pushes on dev, canary, and main to the trade/maintainers team. Any future collaborator with write access must go through a PR with CI gates.
Changes:
Governance applied and verified passing locally.
Scope: governance
Verification: bash scripts/github/verify-governance.sh passes with all PASS.
Risk: Low. No effect on current sole maintainer. Closes direct-push hole for future collaborators.
Summary by CodeRabbit