fix: wire gh-fix-ci repo access gate fail-closed - #3430
Conversation
|
Warning Review limit reachedNext included review available in 19 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: lightspeedwp/.github/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
|
Applied review nitpick: |
Supersedes #3406 dead-code helper by calling has_repo_access in main() before any gh fetch; allowlist known viewerPermission levels and add --skip-access-check escape hatch.
b6e9d53 to
7ebf7d9
Compare
|
Rebased to a clean single commit on current develop (dropped stale fork-merge history and the unrelated README-regen commit, which lives on its own branch). Conflicts resolved; diff is now only the gate + CHANGELOG entry. |
📋 Changelog Quality ValidationSummary
Status❌ Validation FAILED - This PR introduces 1 new changelog failure(s). Please fix them before merging. How to FixReproduce the exact PR check locally (from the repository root): cd .github/validation/changelog
node bin/validate.js --changelog-path ../../../CHANGELOG.md --trigger pr_submission --pr-number 3430 --branch fix/gh-fix-ci-repo-access-gate --output textOnly new failures introduced by this PR block merging; pre-existing Unreleased failures do not block. See Changelog Quality Audit for the rule reference. |
|
Tick the box to add this pull request to the merge queue (same as
|
PR Template RoutingBranch Type: This PR was automatically routed based on the branch naming strategy. |
Bugfix Pull Request
Linked issues
Supersedes #3406 (external fork PR, closed as superseded). No open issue; the defect is the dead-code security helper described below.
Context
Reproduction
Root Cause
#3406 defined has_repo_access() (viewerPermission via gh repo view) but never wired it into main(); denylist comparison also admitted unknown values.
Fix Summary
Verification
Executed 11 mocked checks, all pass: 5 known levels (incl. lowercase) allow; NONE/empty/null/unknown/non-zero-rc/exception deny; main() exits 1 without calling resolve_pr when denied; --skip-access-check bypasses. py_compile clean.
Risk & Rollback
Changelog
Fixed
Checklist (Global DoD / PR)