Skip to content

Commit 1f6cf23

Browse files
ondrejmirtesclaude
andcommitted
Use REST API instead of GraphQL for PR description update
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c5a9df5 commit 1f6cf23

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/issue-bot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ jobs:
337337
exit 0
338338
fi
339339
340-
# Get current PR body
341-
gh pr view "${{ github.event.pull_request.number }}" --json body --jq '.body' > /tmp/pr-body.txt
340+
# Get current PR body via REST API (avoids GraphQL scope requirements)
341+
PR_API="repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}"
342+
gh api "$PR_API" --jq '.body' > /tmp/pr-body.txt
342343
343344
# Append closes lines for issues not already in the body
344345
ADDED=false
@@ -358,4 +359,4 @@ jobs:
358359
exit 0
359360
fi
360361
361-
gh pr edit "${{ github.event.pull_request.number }}" --body-file /tmp/pr-body.txt
362+
gh api "$PR_API" -X PATCH -f body="$(cat /tmp/pr-body.txt)"

0 commit comments

Comments
 (0)