fix(docs): fork checkout needs allow-unsafe-pr-checkout, and an honest skip message - #280
Conversation
…e surfaces that exist - The pull_request_target fallback could not work as documented: since actions/checkout v7 the step refuses to place fork code in such a job without allow-unsafe-pr-checkout: true, so the workflow never reached this action. The input is now in the example, and the warning is rewritten around what checkout itself says: the job holds the base repository's token, secrets, cache scope and runner, and the switch is how you acknowledge that. - The fork skip warning promised findings "in this job's summary" even with job-summary: false, where no summary is written. It now names the annotations alone in that case. A test pins both wordings and fails on the previous unconditional text. - The log excerpt in the docs gets a text language tag (MD040). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
|
Warning Review limit reachedNext included review available in 41 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: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
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 |
Commit Check✅ All 5 checks passed Show all 5 checkscommit-check 2.17.0 · Rules reference |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #280 +/- ##
==========================================
+ Coverage 94.99% 95.01% +0.02%
==========================================
Files 1 1
Lines 599 602 +3
==========================================
+ Hits 569 572 +3
Misses 30 30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Why this is a separate PR
These three fixes were pushed to #279 while it was being merged, so the squash took
0db5e82and left them behind. They apply todocs/fork-pr-comments.mdand the fork skip message that #279 introduced.What
The documented
pull_request_targetfallback cannot work as writtenactions/checkoutadded anallow-unsafe-pr-checkoutinput (v4.4.0, present in v7.0.1) that defaults tofalseand blocks checking out fork pull-request code from apull_request_targetorworkflow_runjob. The example in #279 omits it, so checkout stops and the workflow never reachescommit-check/commit-check-action@v2.Verified against the source rather than taken on trust —
raw.githubusercontent.com/actions/checkout/v7.0.1/action.yml:The input is now in the example, and the warning beside it is rewritten around what checkout itself says: this is the "pwn request" shape, the input is the switch that makes you acknowledge it, the job holds the base repository's token, secrets, cache scope and runner, and the checkout puts the fork's code on that runner. The link now points at GitHub's own Securely using
pull_request_targetinstead of a third-party write-up.The fork skip message promised a job summary that may not exist
With
job-summary: falseno summary is written, but the warning still sent the reader to one. It now names the annotations alone in that case, and both surfaces when the summary is enabled.A test pins both wordings and asserts no summary file is created in the disabled case. Reverting the condition to the previous unconditional text makes it fail, which is how I checked it actually covers the change.
MD040
The log excerpt in the docs gets a
textlanguage tag.Verification
pytest: 194 passed, 8 subtests.pre-commit run --all-filesclean.allow-unsafe-pr-checkout: true.🤖 Generated with Claude Code
https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
Generated by Claude Code