ci: adopt ruleset merge protection and pass owner-authored PRs - #28
Conversation
Documents the protect_main ruleset installed by php-bin's configure script (repository administrators as bypass actors in pull_request mode, classic protection retired) and teaches Protected controls to pass owner-authored PRs, which were unsatisfiable for a solo owner and always ended in an administrative bypass. The gate keeps its full strength against non-owner authors.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 34 seconds 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request replaces classic branch protection with the ChangesProtected controls and repository ruleset
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@docs/admin-state/mise-php-after.json`:
- Around line 94-113: Update the rulesets snapshot entry in mise-php-after.json
to include the effective configuration fields conditions, rules, and
bypass_actors, rather than metadata alone. Normalize these values consistently
with the repository settings snapshot so changes to protected-branch controls
are detected.
In `@docs/repository-settings.md`:
- Around line 19-24: Update the protected controls documentation to explicitly
exempt protected readiness/*.json changes produced by the trusted
github-actions[bot] readiness flow, while retaining the exact-head loadinglucian
approval requirement for other authors and protected paths.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 46097159-f265-4987-b930-60c875f09be8
📒 Files selected for processing (4)
.github/workflows/protected-controls.ymldocs/admin-state/mise-php-after.jsondocs/repository-settings.mdtest/test_autorelease.py
Regenerates the admin snapshot with the full protect_main ruleset configuration and states the trusted readiness-record exemption in the Protected controls description, which the new owner-pass wording had made misleading.
What
Companion to Bigpixelrocket/php-bin#61.
.github/workflows/protected-controls.yml: owner-authored PRs now pass. A solo owner cannot approve their own PR, so the exact-head owner-review requirement was unsatisfiable for owner-authored changes and always ended in an administrative bypass. The short-circuit sits before the readiness-record exemption, so it cannot widen what the automation identity may merge; all non-owner authors still require the exact-head owner approval.docs/repository-settings.md: documents theprotect_mainruleset model (installed by php-bin's configure script) with repository administrators as bypass actors inpull_requestmode, replacing classic branch protection and its enforce_admins toggle.test/test_autorelease.py: pins the owner short-circuit's position relative to the automation exemption.Notes
protected-controls.ymlruns onpull_request_target, so the owner-pass behavior takes effect only after this merges; this PR itself shows the old red-by-design failure.Verification
./scripts/test.shpasses (23 tests).Summary by CodeRabbit
New Features
Documentation
Tests