Skip to content

ci: on-demand PR review via /review comment - #6

Merged
ahrzb merged 5 commits into
masterfrom
claude/review-ci-action-failure-6883b8
Jul 23, 2026
Merged

ci: on-demand PR review via /review comment#6
ahrzb merged 5 commits into
masterfrom
claude/review-ci-action-failure-6883b8

Conversation

@ahrzb

@ahrzb ahrzb commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Turns the review workflow into an on-demand action: comment /review on any PR and Claude reviews it and posts the results.

Why /review and not @claude: the official Claude app is already installed on this repo and matches the @claude substring — reusing it would fire two reviews per mention. /review is collision-free.

Changes to .github/workflows/claude-review.yml:

  • Trigger: pull_request (every push) → issue_comment / pull_request_review_comment containing /review, gated to PRs only.
  • Posts the review (was the core bug — reviews ran but nothing landed on the PR): grants the comment tools (mcp__github_inline_comment__create_inline_comment, gh pr comment/diff/view), sets track_progress: true, and the prompt now explicitly tells the agent to post inline comments + a top-level summary. Matches Anthropic's pr-review-comprehensive.yml recipe.
  • Dropped show_full_output (public-log transcript leak) and use_sticky_comment.

Can't be exercised on a branch (workflow-triggered runs use the default-branch copy), so it proves out on the first /review after merge.

🤖 Generated with Claude Code

ahrzb and others added 5 commits July 23, 2026 04:46
The requesting-code-review skill reads code-reviewer.md from the plugin
cache (~/.claude/plugins), which claude-code-action's repo-only sandbox
blocks. Grant read access via project settings (settingSources: project),
loaded without touching the workflow file. Track the shared settings file
via a .gitignore negation instead of force-add.

Verified: review ran full (21 turns, is_error:false) on this branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Agents push feature branches as claude-agent-ahrzb (App identity), which
claude-code-action blocks by default. Scope allowed_bots to that bot only
(not '*') so only our agents' pushes trigger a review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Public repo — show_full_output publishes the review agent's full transcript
to public Actions logs. It was a temporary capture flag; remove it so the
merge to master also clears it there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The review agent produced its findings as final text but never called a
GitHub comment tool, and every auto-post flag was off, so nothing landed on
the PR. track_progress posts the report as a tracking comment;
use_sticky_comment keeps it to one comment per PR across pushes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
track_progress alone was not enough. Per Anthropic's canonical
pr-review-comprehensive.yml example, the agent needs the comment tools
granted in --allowedTools (mcp__github_inline_comment + gh pr comment) and
an explicit instruction to post; otherwise it reviews and exits without
writing anything to the PR. Drop use_sticky_comment (not in the recipe).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ahrzb
ahrzb merged commit 44ccc9c into master Jul 23, 2026
2 checks passed
@ahrzb ahrzb changed the title ci: post reviews to the PR + drop debug log flag ci: on-demand PR review via /review comment Jul 23, 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.

1 participant