From ca231325e96d7e2a572ba6926afd000bcbe557d1 Mon Sep 17 00:00:00 2001 From: Jonny Spicer Date: Wed, 24 Jun 2026 23:21:17 +0100 Subject: [PATCH] Fix Claude Code Review workflow so comments post on PRs The workflow's GITHUB_TOKEN was scoped to pull-requests/issues: read, so the review ran but every attempt to post it was denied and nothing appeared on the PR. Grant write scope, add the inline-comment MCP tool and gh commands to --allowedTools so the code-review plugin can buffer and post its comments, and enable track_progress for a visible summary. Mirrors the fix already applied to tower-finder-service. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/claude-code-review.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index b5e8cfd..718ac8c 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -21,8 +21,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - pull-requests: read - issues: read + pull-requests: write + issues: write id-token: write steps: @@ -38,7 +38,9 @@ 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' + track_progress: true prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + 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 -