From 07c42615470de9c14794d5654f2298474ddcb063 Mon Sep 17 00:00:00 2001 From: jth-nw Date: Wed, 13 May 2026 13:32:44 -0500 Subject: [PATCH] fix(ci): use gh api to post ack comment so comment ID is captured gh pr comment does not support --format json, so PROGRESS_COMMENT_ID was always empty. The doc-pr-fix skill fallback had the same bug. Switch both to gh api POST which supports --jq for extracting the ID. Generated with AI Co-Authored-By: Claude Code --- .claude/skills/doc-pr-fix/SKILL.md | 5 +++-- .github/workflows/claude-doc-pr.yml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.claude/skills/doc-pr-fix/SKILL.md b/.claude/skills/doc-pr-fix/SKILL.md index 5f8c22a2be..946b0b98e5 100644 --- a/.claude/skills/doc-pr-fix/SKILL.md +++ b/.claude/skills/doc-pr-fix/SKILL.md @@ -65,8 +65,9 @@ If `$PROGRESS_COMMENT_ID` is empty for any reason, fall back to creating a new c ```bash if [ -z "${PROGRESS_COMMENT_ID:-}" ]; then - PROGRESS_COMMENT_ID=$(gh pr comment "$PR_NUMBER" --body "**Fix in progress:** ..." \ - --format json | jq -r '.id' 2>/dev/null || echo "") + PROGRESS_COMMENT_ID=$(gh api "repos/$REPO_OWNER/$REPO_NAME/issues/$PR_NUMBER/comments" \ + --method POST --field body="**Fix in progress:** ..." \ + --jq '.id' 2>/dev/null || echo "") fi ``` diff --git a/.github/workflows/claude-doc-pr.yml b/.github/workflows/claude-doc-pr.yml index f030831de6..47985d10f6 100644 --- a/.github/workflows/claude-doc-pr.yml +++ b/.github/workflows/claude-doc-pr.yml @@ -170,10 +170,10 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - COMMENT_ID=$(gh pr comment "${{ steps.pr-info.outputs.number }}" \ - --repo "${{ github.repository }}" \ - --body "**Acknowledged:** Analyzing your request — I'll update this comment with a task list shortly." \ - --format json | jq -r '.id') + COMMENT_ID=$(gh api "repos/${{ github.repository }}/issues/${{ steps.pr-info.outputs.number }}/comments" \ + --method POST \ + --field body="**Acknowledged:** Analyzing your request — I'll update this comment with a task list shortly." \ + --jq '.id') echo "comment_id=$COMMENT_ID" >> "$GITHUB_OUTPUT" - name: Checkout repository