From 444d78876f3a901681349fdcb441ed0913b0072b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 4 Aug 2026 15:18:32 -0300 Subject: [PATCH] ci: claude-pr-review: Fix post comment action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/claude-pr-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml index 18f2e48122..cbd9d4920a 100644 --- a/.github/workflows/claude-pr-review.yml +++ b/.github/workflows/claude-pr-review.yml @@ -206,8 +206,8 @@ jobs: - Then determine whether a previous bot comment exists by scanning the PR's comments for the marker: `gh api "repos/$REPO/issues/$PR_NUMBER/comments" --paginate --jq '.[] | select(.body | startswith("")) | .id' | head -n 1` - If an id is returned, UPDATE that comment: - `gh api --method PATCH "repos/$REPO/issues/comments/" -f body=@review.md` - (if `-f body=@review.md` is not supported by the installed `gh` version, fall back to `jq -Rs . < review.md` to build a JSON payload and pipe via `--input -` to `gh api`.) + `gh api --method PATCH "repos/$REPO/issues/comments/" -F body=@review.md` + (use `-F`, not `-f`: only `--field`/`-F` reads the value from the file via `@`; `--raw-field`/`-f` would post the literal string `@review.md`.) - Otherwise CREATE a new comment: `gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file review.md` - Post exactly one comment. Do not open issues, do not modify files in the repo, do not push, do not approve/request-changes on the PR.