From 66b0fc0cefb017fb3b0a833321bdf70754004403 Mon Sep 17 00:00:00 2001 From: liobrasil Date: Wed, 4 Feb 2026 20:07:50 -0400 Subject: [PATCH] ci: fix Claude review not posting comments Claude was using `gh api` instead of `gh pr comment` to post reviews, but `gh api` is not in the allowed tools list, causing the comment to fail silently. Changes: - Add explicit warning to use `gh pr comment` and not `gh api` - Clarify the command format with a proper code block Co-Authored-By: Claude Opus 4.5 --- .github/workflows/claude-code-review.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 7295f69..ea2c11d 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -61,15 +61,17 @@ jobs: Requirements: - Always include the marker `` at the very top of the comment. + - IMPORTANT: You MUST use `gh pr comment` to post your review. Do NOT use `gh api` as it is not in your allowed tools and will fail silently. - Use `gh pr comment` with `--edit-last --create-if-none` so subsequent runs update the prior comment. - Replace the entire comment body each run (overwrite, don't append). - Command pattern: - - Recommended (handles multiline safely): - `gh pr comment ${{ github.event.pull_request.number }} --edit-last --create-if-none --body-file - <<'EOF'` - `` - `` - `EOF` + Command (use exactly this pattern): + ``` + gh pr comment ${{ github.event.pull_request.number }} --edit-last --create-if-none --body-file - <<'EOF' + + + EOF + ``` # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options