workflows: fix Claude workflows for fork PRs and external contributors#10531
workflows: fix Claude workflows for fork PRs and external contributors#10531Roasbeef merged 2 commits intolightningnetwork:masterfrom
Conversation
When a PR originates from a fork, the PR branch doesn't exist in the origin remote. This adds a step that uses `gh pr checkout` before running the Claude action, which properly handles fork PRs by adding the fork as a remote and fetching the branch from there.
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
🟢 PR Severity: LOW
🟢 Low (1 file)
AnalysisThis PR modifies only the GitHub Actions workflow configuration file ( The change appears to fix the PR checkout process for fork PRs, which is an infrastructure improvement that does not impact the core Lightning Network Daemon functionality, wallet operations, or any critical payment/routing logic. Classification: LOW
To override, add a |
The PR severity classifier was failing for external contributors because the claude-code-action checks that the actor has write permissions. Since this workflow only reads PR metadata via the API and doesn't execute any code from the PR (and has restricted tool permissions), it's safe to allow any user to trigger classification.
🟢 PR Severity: LOW
🟢 Low (2 files)
AnalysisThis PR modifies GitHub Actions workflow files to fix PR checkout behavior for fork PRs. Both changed files fall under the CI/CD configuration category ( The changes are limited to workflow automation and do not impact any critical Lightning Network functionality, core server logic, wallet operations, or payment routing. This is a straightforward infrastructure improvement that can be reviewed with best effort. No severity bump applied: The PR touches only 2 files with 17 lines changed, well below the thresholds that would trigger a severity increase. To override, add a |
This PR fixes two issues with the Claude workflows when triggered by external contributors or fork PRs.
Claude Code workflow (fork PR checkout): When the workflow triggers on a PR from a fork, it fails because the action tries to fetch the PR branch from origin, but that branch only exists in the forked repository. This adds a step that runs
gh pr checkoutbefore the Claude Code action executes, which properly handles fork PRs by automatically adding the fork as a remote and fetching the branch from there.PR Severity workflow (contributor permissions): The PR severity classifier was failing for external contributors because the claude-code-action checks that the actor has write permissions. Since this workflow only reads PR metadata via the API, does not execute any code from the PR, and has restricted tool permissions (
gh pr view/edit/commentonly), it is safe to allow any user to trigger classification. This addsallowed_non_write_users: "*"to enable classification on contributor PRs.Fixes the error seen in #10529 (comment).