From 5f93be0e39db258f17b3949db09628e12d4671ed Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 30 Sep 2026 14:23:44 +0000 Subject: [PATCH] ci(review): make Claude Code Review post its findings The workflow ran /code-review:code-review without --comment, and the code-review plugin stops before posting when --comment is absent (anthropics/claude-code plugins/code-review/commands/code-review.md). The inline-comment MCP server is also only installed when its tool is listed in --allowedTools (claude-code-action src/mcp/install-mcp-server.ts). Add --comment, the allowedTools list from the action's docs/solutions.md review example, and pull-requests: write as in that example. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ --- .github/workflows/claude-code-review.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index d9857395..4abe7cd2 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pull-requests: read + pull-requests: write issues: read id-token: write @@ -42,7 +42,13 @@ jobs: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + # --comment: without it the code-review plugin prints findings to the + # job log only and posts nothing to the PR (plugin commands/code-review.md). + prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} --comment' + # The inline-comment MCP server is only installed when its tool is + # listed here; tool list from the action's docs/solutions.md review example. + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://code.claude.com/docs/en/cli-reference for available options