Skip to content

workflows: fix Claude workflows for fork PRs and external contributors#10531

Merged
Roasbeef merged 2 commits intolightningnetwork:masterfrom
Roasbeef:claude-fix
Jan 29, 2026
Merged

workflows: fix Claude workflows for fork PRs and external contributors#10531
Roasbeef merged 2 commits intolightningnetwork:masterfrom
Roasbeef:claude-fix

Conversation

@Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Jan 29, 2026

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 checkout before 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/comment only), it is safe to allow any user to trigger classification. This adds allowed_non_write_users: "*" to enable classification on contributor PRs.

Fixes the error seen in #10529 (comment).

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.
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@lightninglabs-deploy
Copy link
Collaborator

🟢 PR Severity: LOW

Changed: 1 file | 12 lines added | 0 lines deleted

🟢 Low (1 file)
  • .github/workflows/claude.yml - CI/CD workflow configuration

Analysis

This PR modifies only the GitHub Actions workflow configuration file (.github/workflows/claude.yml). According to the severity classification rules, changes to .github/* files fall under the LOW severity category as they affect CI/CD configuration only and require best-effort review.

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

  • Single file changed (CI/CD configuration)
  • 12 lines added
  • No core LND code affected

To override, add a severity-override-{critical,high,medium,low} label.

Copy link
Collaborator

@saubyk saubyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

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.
@lightninglabs-deploy
Copy link
Collaborator

🟢 PR Severity: LOW

CI/CD Configuration | 2 files | 17 lines changed

🟢 Low (2 files)
  • .github/workflows/claude.yml - Claude AI workflow configuration update
  • .github/workflows/pr-severity.yml - PR severity workflow configuration update

Analysis

This PR modifies GitHub Actions workflow files to fix PR checkout behavior for fork PRs. Both changed files fall under the CI/CD configuration category (.github/*), which is classified as LOW severity according to the classification rules.

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 severity-override-{critical,high,medium,low} label.

@Roasbeef Roasbeef changed the title workflows/claude: fix PR checkout for fork PRs workflows: fix Claude workflows for fork PRs and external contributors Jan 29, 2026
@Roasbeef Roasbeef merged commit 7ccab02 into lightningnetwork:master Jan 29, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants