GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: add claude PR review workflow using differential-review skill by ziggie1984 · Pull Request #10654 · lightningnetwork/lnd

Conversation

@ziggie1984

@ziggie1984 ziggie1984 commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds claude-review.yml workflow triggered by @claude review comments on PRs
  • Uses the differential-review skill from lightninglabs/agent-skills, cloned at runtime
  • Pins to anthropics/claude-code-action#963 fix commit to correctly handle fork PRs (the current @v1 fails with fatal: couldn't find remote ref on fork branches)
  • Excludes @claude review from claude.yml to prevent both workflows firing on the same comment
  • Includes workflow_dispatch for testing the workflow on this branch before merging

Test plan

  • Manually trigger via Actions → Claude PR Review → Run workflow on this branch with a PR number
  • Verify agent-skills clones correctly and differential-review skill is loaded
  • Comment @claude review on a fork PR and confirm it doesn't hit the branch fetch error
  • Remove workflow_dispatch block before final merge

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gemini-code-assist

gemini-code-assist Bot commented Mar 23, 2026

Copy link
Copy Markdown

Note

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ziggie1984
ziggie1984 force-pushed the claude-review-workflow branch from e97a95f to 2c807c0 Compare March 23, 2026 12:55
@saubyk saubyk assigned ziggie1984 Mar 23, 2026
saubyk
saubyk reviewed Mar 23, 2026
View reviewed changes

@saubyk saubyk left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Just one clarification

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/claude-review.yml
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

@saubyk saubyk Mar 23, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Clarification: Does Claude need 'write' permission to post review comments on the issue or pr?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ellemouton ellemouton Mar 23, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

yes it is needed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ziggie1984 ziggie1984 Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

yes because we want to post comments on the PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
saubyk
saubyk approved these changes Mar 23, 2026
View reviewed changes
@ziggie1984
ziggie1984 force-pushed the claude-review-workflow branch 3 times, most recently from 883f5c6 to 86e3a2a Compare March 23, 2026 17:49
@litbot-9000

litbot-9000 commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

@ziggie1984, remember to re-request review from reviewers when ready

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ziggie1984
ziggie1984 force-pushed the claude-review-workflow branch from f8d20b7 to a5eff49 Compare April 2, 2026 09:48
@ziggie1984

ziggie1984 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

New CI: Claude PR Review Workflow

This PR adds a new claude-review.yml workflow that is separate and independent from the existing claude.yml action already in the repo — it does not interfere with it in any way.

Why a separate workflow?

The existing claude-code-action has a known limitation: it does not support PRs whose head branch lives in a fork. Since most contributor PRs come from forks, the action simply cannot check out and review them.

This new workflow works around that by using gh pr checkout (fork-safe) to explicitly check out the PR branch before invoking Claude, making it work for both fork and non-fork PRs.

How it is triggered

The workflow activates on any of the following:

  • A comment containing @claude review is posted on a PR (issue comment or review comment)
  • Manually via workflow_dispatch by providing a PR number

It then runs our own /code-review slash command via claude -p and posts the findings back as a PR comment.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erickcestari

erickcestari commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

@claude are you being able to fetch the fork branch? Also review this change to check.

claude[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@claude

claude Bot commented Apr 2, 2026

Copy link
Copy Markdown

Claude Code is working…

I'll analyze this and get back to you.

View job run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ziggie1984 ziggie1984 added no-changelog CI continuous integration labels Apr 2, 2026
@ziggie1984
ci: use claude /code-review skill to automate PR reviews
96a81fd
Wire up the claude-review workflow to invoke our own /code-review
slash command via claude -p, posting the findings as a PR comment.
@ziggie1984
ziggie1984 force-pushed the claude-review-workflow branch from a5eff49 to 96a81fd Compare April 2, 2026 13:51
@ziggie1984

ziggie1984 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

After looking into the security implications of running the Claude workflow in CI, we've identified a few concerns worth noting:

The current setup checks out untrusted fork code in the same job that holds the CLAUDE_CODE_OAUTH_TOKEN. This creates a potential attack vector where a malicious PR could include
tampered .claude/settings.json or CLAUDE.md files with hooks that exfiltrate the secret before Claude even processes the comment. Additionally, prompt injection via code comments is a
residual risk that is difficult to fully eliminate in a workflow-based approach.

Possible mitigations include adding an author_association guard, a precheck on modified Claude config files, or a full split-job architecture — but each comes with its own tradeoffs.

For now we have decided to run Claude reviews locally rather than through CI. This avoids the problem entirely — no secrets are exposed, no untrusted code runs in a shared environment,
and a human remains in the loop before anything gets posted. We can revisit automated CI integration once a more secure architecture is in place.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ziggie1984 ziggie1984 closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ellemouton ellemouton ellemouton left review comments
@saubyk saubyk saubyk approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ziggie1984 ziggie1984

Labels

CI continuous integration no-changelog

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ziggie1984 @litbot-9000 @erickcestari @ellemouton @saubyk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.