Run CI on fork pull requests - #185
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe lint workflow now grants only ChangesLint workflow access and fork execution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
averyjennings
left a comment
There was a problem hiding this comment.
Approve — no blockers.
This removes the three job-level if: fork guards from .github/workflows/lint.yml, restoring ShellCheck/Completions/BATS coverage for fork PRs. Verified it's a clean, intentional revert of #179's lint.yml change (the PR blob matches the exact pre-#179 version; #179's commit 828413f added precisely these three lines), not a stale-snapshot regression.
The security reasoning in the description holds up under inspection:
- The workflow triggers on plain
pull_request, notpull_request_target— so fork runs get no repository secrets and a read-onlyGITHUB_TOKEN.permissions: read-allenforces read-only regardless. lint.ymlreferences no secrets at all. The only secret-bearing workflow,homebrew.yml(HOMEBREW_TAP_TOKEN), triggers solely onreleaseandworkflow_dispatch— neither reachable from a fork PR.- The three jobs only checkout, install tooling, and run linters/tests on an ephemeral runner. Residual risk is runner compute abuse, already covered by GitHub's contributor-approval gate (and the stricter "Require approval for all outside collaborators" setting noted in the description if you want it).
This is a strict improvement: previously the skipped jobs reported neutral/green, so fork PRs like #183 merged with zero real CI coverage. Now those checks actually run.
* Detect and recover locked worktree entries with missing directories (coderabbitai#182) git worktree prune skips locked entries by design, so a locked worktree whose directory was deleted (e.g. a crashed agent session) lingers in the registry and keeps its branch checked out. clean now detects this, offers to unlock and prune (auto-confirmed by --force/--yes, previewed by --dry-run), and prints the manual recovery command when declined. * feat(clean): support closed PR cleanup (coderabbitai#183) * feat(clean): support closed PR cleanup Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(clean): address closed cleanup review nits Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix(clean): match GitLab head_sha fallback Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * Release v2.8.0 * Replace Homebrew bump action with direct formula update (coderabbitai#184) * Replace Homebrew bump action with direct formula update * Allow manual formula bump via workflow_dispatch * Return non-zero when git gtr rm fails (coderabbitai#190) * Fix rm exit status on removal failures * Test public rm failure status * chore: prepare v2.8.1 release * fix(copy): bound includeDirs discovery (coderabbitai#191) * fix(copy): bound includeDirs discovery * test(copy): allow filesystem result order * fix(copy): preserve basename fallback * chore: prepare v2.8.2 release * feat: inherit sparse-checkout in new worktrees (coderabbitai#186) * feat: inherit sparse-checkout in new worktrees When creating a new worktree from one with sparse-checkout enabled, the new worktree inherits the cone pattern automatically. Controlled by gtr.sparse.inherit config (default on) and --sparse/--no-sparse flags. Adds reusable helpers for sparse-checkout replication. * fix(sparse): address CodeRabbit review feedback on sparse-checkout inheritance - Preserve slash-separated branch paths in _worktree_path_for_ref - Allow fallback to top-level worktree when matching worktree is not sparse - Add Git 2.25+ guard for sparse-checkout support with full checkout fallback - Fix non-cone mode to use init --no-cone (git defaults to cone mode) - Improve error handling: failed sparse inheritance now falls back to full checkout and hard-errors if that fails, instead of leaving --no-checkout worktree empty - Add tests for slash refs, non-cone inheritance, and sparse config precedence * fix: harden sparse-checkout inheritance * fix: support pre-2.20 config lookup * fix: align sparse sources with git refs --------- Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com> * Add PR worktree checkout command (coderabbitai#187) * feat: add pull request worktree command Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix: make pr worktrees gh-aware Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix: harden pr worktree checkout Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix: address pr review feedback Assisted-by: pi:gpt-5.5 Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com> * Run CI on fork pull requests (coderabbitai#185) * Run CI on fork pull requests * fix(ci): minimize fork pull request permissions * chore: prepare v2.9.0 release * feat: add machine-readable worktree creation for agents (coderabbitai#192) Adds stable porcelain output and hook disposition reporting for shell-native agent integrations, with tests and documentation. * chore: prepare v2.10.0 release * perf: avoid per-worktree path resolution in list * fix: complete v2.10 integration artifacts --------- Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com> Co-authored-by: scarf <greenscarf005@gmail.com> Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Adam Wettreich <80975389+adamwett@users.noreply.github.com>
Summary
contents: read.Why
The existing job guards skip all CI for external contributions, so fork pull requests can appear green without running ShellCheck or tests. Plain
pull_requestworkflows are GitHub's intended unprivileged path for validating fork code.Security model
pull_requestruns receive no repository secrets.GITHUB_TOKENis limited tocontents: read, the minimum recommended for checkout.persist-credentials: falsekeeps that token out of Git configuration used by subsequent scripts.Validation
mainis conflict-free.Summary by CodeRabbit