Skip to content

Let format-suggest check out fork pull requests again - #3027

Open
roaldarbol wants to merge 1 commit into
r-lib:mainfrom
roaldarbol:fix/format-suggest-fork-checkout
Open

roaldarbol wants to merge 1 commit into
r-lib:mainfrom
roaldarbol:fix/format-suggest-fork-checkout

Conversation

@roaldarbol

Copy link
Copy Markdown

format-suggest fails on every fork PR (since 2026-07-31) with "Refusing to check out fork pull request code from a 'pull_request_target' workflow", because actions/checkout now requires allow-unsafe-pr-checkout: true for this. This opts in and bumps to actions/checkout@v7, matching the posit-dev/setup-air example (posit-dev/setup-air#100) and r-lib/httr2#872. As the workflow's own comment explains, the fork's code is only read by air format, never executed. Note that this PR's own format-suggest check will still fail, since pull_request_target runs the workflow from main.

This PR was made with AI assistance (Claude Code); I have reviewed the changes.

`actions/checkout` now refuses to check out fork pull request code in a `pull_request_target` workflow unless `allow-unsafe-pr-checkout: true` is set, so `format-suggest` has failed on every fork PR since 2026-07-31. This opts in and bumps to `actions/checkout@v7`, matching the `posit-dev/setup-air` example (posit-dev/setup-air#100). The fork's code is only read by `air format`, never executed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant