Skip to content

feat: implement issue #340 — Compliance: ruleset-drift-pr-quality-require_last_push_approval - #350

Closed
don-petry wants to merge 2 commits into
mainfrom
dev-lead/issue-340-20260717-1355
Closed

feat: implement issue #340 — Compliance: ruleset-drift-pr-quality-require_last_push_approval#350
don-petry wants to merge 2 commits into
mainfrom
dev-lead/issue-340-20260717-1355

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Closes #340

Implemented by dev-lead agent. Please review.

Copilot AI review requested due to automatic review settings July 17, 2026 13:59
@don-petry
don-petry requested a review from a team as a code owner July 17, 2026 13:59
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3bd6395b-65e5-4f74-8e2b-43c83b70f03d

📥 Commits

Reviewing files that changed from the base of the PR and between f2ff479 and 718aa1c.

📒 Files selected for processing (2)
  • scripts/setup-rulesets.sh
  • scripts/tests/setup-rulesets-workflow.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-340-20260717-1355

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/tests/setup-rulesets-workflow.bats Outdated
Comment thread scripts/tests/setup-rulesets-workflow.bats Outdated
Comment thread scripts/tests/setup-rulesets-workflow.bats Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-quality ruleset payload to scripts/setup-rulesets.sh with require_last_push_approval: true (and related PR rule parameters).
  • Add a new Bats workflow test that mocks gh api calls and asserts the emitted pr-quality ruleset 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.

Comment on lines +50 to +53
# 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
}
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Files changed: none
Skipped (informational): 0
Status: Quality gate passed — no fixes required
```

@don-petry

Copy link
Copy Markdown
Contributor Author

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.

@don-petry don-petry closed this Jul 21, 2026
auto-merge was automatically disabled July 21, 2026 03:14

Pull request was closed

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.

Compliance: ruleset-drift-pr-quality-require_last_push_approval

3 participants