Skip to content

Commit 5fb4c12

Browse files
chapati23claude
andcommitted
fix(ci): correct code-review prompt and elevate permissions
Codex review found two real issues in the generated workflow: - The PR selector `${{ github.repository }}/pull/${{ ... }}` expands to `owner/repo/pull/N`, which `gh pr view` rejects as a branch lookup. Pass the number directly so the plugin can resolve the PR. - The code-review plugin only prints findings to the Actions log unless `--comment` is supplied; without it the review never reaches the PR. - Posting PR comments requires `pull-requests: write` on the job token. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2217bbd commit 5fb4c12

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
permissions:
2626
contents: read
27-
pull-requests: read
27+
pull-requests: write
2828
issues: read
2929
id-token: write
3030

@@ -41,6 +41,6 @@ jobs:
4141
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
4242
plugin_marketplaces: "https://github.com/anthropics/claude-code.git"
4343
plugins: "code-review@claude-code-plugins"
44-
prompt: "/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
44+
prompt: "/code-review:code-review ${{ github.event.pull_request.number }} --comment"
4545
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4646
# or https://code.claude.com/docs/en/cli-reference for available options

0 commit comments

Comments
 (0)