Skip to content

ci(claude): pass --comment so the code-review plugin posts its findings - #56

Merged
gonzafg2 merged 1 commit into
mainfrom
ci/claude-review-pass-comment-flag
Jun 11, 2026
Merged

gonzafg2 merged 1 commit into
mainfrom
ci/claude-review-pass-comment-flag

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Summary

Companion to #55: passes --comment to the code-review plugin so it actually posts its findings to the PR instead of printing them only to the job log.

Motivation

After #55 merged, the first claude-review run with the fixed workflow (run 27358953209, PR #46) mounted the inline-comment MCP server correctly and produced the new claude-review-transcript artifact — which is precisely what made the remaining gap visible. The transcript shows the reviewer completed the full review, compiled four findings, and then stopped with:

No --comment flag provided — no GitHub comments posted.

That is the plugin working as documented: step 7 of code-review.md reads "If --comment argument was NOT provided, stop here. Do not post any GitHub comments." Our prompt: never passed the flag, so no run has ever been authorized to post.

The fix

One line: append --comment to the plugin invocation in prompt:. With it, the plugin posts inline comments per finding via mcp__github_inline_comment__create_inline_comment (the tool #55 made available) and a summary comment when there are no findings.

Verification

Same caveat as #55: the OIDC token exchange rejects runs whose workflow file differs from main's, so the claude-review check on this PR fails by design and the fix can only be exercised after merge. Expected on the first post-merge run: inline comments (or a "No issues found" summary comment) actually appearing on the reviewed PR. The transcript artifact from #55 makes the outcome auditable either way.

Type of change

  • CI only

Checklist

  • Commits signed off under the DCO (git commit -s).
  • Conventional Commits.

Security considerations

The flag only authorizes the plugin's documented posting path (inline review comments via the action's MCP server, using the workflow's pull-requests: write permission already in place). No new permissions, no untrusted interpolation.

The plugin's command is explicit (step 7): 'If --comment argument was
NOT provided, stop here. Do not post any GitHub comments.' Our prompt
never passed it, so every review ran to completion and printed its
findings only to the job log — confirmed by the PR #46 run transcript
(run 27358953209), which ends with 'No --comment flag provided — no
GitHub comments posted' right after compiling four findings.

Companion to #55: that PR mounted the github_inline_comment MCP server
the posting step needs; this one flips the plugin's own posting switch.

Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2
gonzafg2 merged commit 6715f4c into main Jun 11, 2026
6 of 7 checks passed
@gonzafg2
gonzafg2 deleted the ci/claude-review-pass-comment-flag branch July 18, 2026 04:15
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