Skip to content

fix: add reusable Claude PR review workflow - #80

Draft
prquinlan wants to merge 20 commits into
mainfrom
claude-review-2-workflows
Draft

prquinlan wants to merge 20 commits into
mainfrom
claude-review-2-workflows

Conversation

@prquinlan

@prquinlan prquinlan commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✨ Feature

PR Description

Adds .github/workflows/claude-review.yml, which runs the Claude review action on pull requests: when one is opened, gets new commits or is marked ready for review, and when someone adds the claude-review label. It skips forks, Dependabot and drafts (unless labelled), and passes ANTHROPIC_API_KEY explicitly.

  • claude-review-caller.yml runs it on this repository's own PRs.
  • defaults.bats checks the workflow and action defaults match.
  • Docs, a readme row and samples/check.claude-review.yaml.

The composite action was pushed to main by mistake, bypassing review. Nothing calls it until this PR, so please review it here as well.

prquinlan and others added 2 commits November 20, 2026 07:37
Adds .github/workflows/claude-review.yml, which runs the Claude review action
on pull requests: when one is opened, gets new commits or is marked ready for
review, and when someone adds the claude-review label. It skips forks,
Dependabot and drafts (unless labelled), and passes ANTHROPIC_API_KEY
explicitly.

- claude-review-caller.yml runs it on this repository's own PRs.
- defaults.bats checks the workflow and action defaults match.
- Docs, a readme row and samples/check.claude-review.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each run reviews the whole PR again, so the action now deals with the findings
of earlier runs:

- Earlier findings that nobody replied to are resolved, or marked superseded
  when the workflow token cannot resolve threads (it cannot, and the action
  does not ask for more permission). Each thread is checked again just before
  it is changed, so a reply posted during the review is respected.
- fetch-discussed.sh passes replies to earlier findings to Claude, so it does
  not raise a finding again after someone disagrees. Only replies from owners,
  members and collaborators count, and only on threads a bot started.
- Review threads are fetched once, with pagination, and saved outside the
  checkout, where Claude cannot read them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@prquinlan
prquinlan requested a review from AndyRae as a code owner November 20, 2026 08:16
github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

@AndyRae AndyRae left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm - make claude happy with the readme update and I think we're good

Copilot AI balanced review requested due to automatic review settings November 22, 2026 14:16
github-actions[bot]

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:44

This comment was marked as resolved.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 19:54
github-actions[bot]

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 20:07
github-actions[bot]

This comment was marked as resolved.

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

@github-actions

Copy link
Copy Markdown

Claude review of c742bf8: 0 inline finding(s).

The review ran. I found no defects that I can point to on an exact line.

I examined all changed files. I also examined the composite action that the PR description asks about: action.yml, check-size.sh, fetch-pr.sh, review.sh and post.sh.

Good points:

  • Third-party actions use a commit SHA.
  • permissions are {} at the top level, and the job permissions are small.
  • Untrusted values go through env: and do not go directly into run:.
  • The checkout uses persist-credentials: false.
  • The if: expression gives the correct result, because && binds tighter than ||.
  • default_of in defaults.bats finds the correct input blocks in action.yml and in claude-review.yml.

I could not verify these items. Please confirm them:

  1. Does GitHub Actions support uses: $/.github/actions/claude-review in claude-review.yml line 83? If it does not, the step fails in every caller repository.
  2. --bare is said to set CLAUDE_CODE_SIMPLE=1. In that mode, Claude Code possibly gives only Bash, Read and Edit. Check that --tools "Read,Grep,Glob" still gives Grep and Glob with --bare in Claude Code 2.1.325. review.bats uses a fake claude, so it cannot find this problem.
  3. Job-level concurrency has cancel-in-progress: true. Can a run whose job is skipped cancel a review that is in progress? Examples are a labeled event for a different label, or a labeler bot. If it can, reviews can stop without a result.
  4. timeout-minutes: 10 must cover npm ci and up to 25 Opus turns at high effort. Check that this time is sufficient for PRs near max-lines.

A small usability point: on fork, Dependabot and closed PRs, the job does not run, so the step that removes the label does not run. The label stays on the PR, and a person must remove it before they add it again.

@prquinlan
prquinlan marked this pull request as draft November 24, 2026 16:20
@prquinlan
prquinlan requested a balanced review from Copilot November 24, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@prquinlan prquinlan added the claude-review trigger a claude review label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

PR too large for automated review (2957 lines changed, limit 2000). Consider splitting it up.

@github-actions github-actions Bot removed the claude-review trigger a claude review label Nov 24, 2026
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.

3 participants