feat: implement issue #340 — Compliance: ruleset-drift-pr-quality-require_last_push_approval - #350
feat: implement issue #340 — Compliance: ruleset-drift-pr-quality-require_last_push_approval#350don-petry wants to merge 2 commits into
Conversation
…uire_last_push_approval
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new pr-quality ruleset in scripts/setup-rulesets.sh to enforce pull-request review policies on the default branch, along with a comprehensive Bats test suite in scripts/tests/setup-rulesets-workflow.bats to validate the ruleset payload. The review feedback highlights opportunities to improve the robustness of the Python assertion scripts within the tests by using safe navigation and fallbacks instead of direct dictionary key lookups, preventing unhandled KeyError, TypeError, or StopIteration exceptions.
There was a problem hiding this comment.
Pull request overview
This PR brings ContentTwin’s repository ruleset automation into compliance with issue #340 by codifying the pr-quality ruleset so require_last_push_approval is enforced as true for the default branch.
Changes:
- Add a
pr-qualityruleset payload toscripts/setup-rulesets.shwithrequire_last_push_approval: true(and related PR rule parameters). - Add a new Bats workflow test that mocks
gh apicalls and asserts the emittedpr-qualityruleset payload matches the expected JSON shape and values.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/setup-rulesets.sh | Adds creation/update logic for the pr-quality ruleset with require_last_push_approval enabled. |
| scripts/tests/setup-rulesets-workflow.bats | Adds test coverage to validate the pr-quality ruleset payload emitted by setup-rulesets.sh. |
| # Locate the captured payload file whose JSON contains a rule of the given name. | ||
| pr_quality_payload() { | ||
| grep -rl '"pr-quality"' "$PAYLOAD_DIR" 2>/dev/null | head -1 | ||
| } |
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
|
Closing as part of the open-PR drain (50-PR automation cap). This branch has real merge conflicts with main and cannot be rebased automatically; the linked compliance issue remains OPEN so dev-lead can regenerate a clean PR once there is cap headroom. No work is lost. |
Pull request was closed



Closes #340
Implemented by dev-lead agent. Please review.