Skip to content

fix(review-pr): use JSON payload for review comments instead of broken -f flag syntax - #1410

Merged
max-sixty merged 1 commit into
mainfrom
hourly/review-22852797352
Mar 9, 2026
Merged

max-sixty merged 1 commit into
mainfrom
hourly/review-22852797352

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Replace broken gh api -f 'comments[0][path]=...' syntax in the review-pr skill with a JSON payload approach using --input
  • The -f flag syntax converts array indices to object keys ({"0": {...}} instead of [{...}]), which GitHub rejects
  • Add a warning note to prevent future regression to the broken pattern

Closes #1409

Test plan

  • Verify next claude-review run posts inline comments successfully on first attempt (no "Invalid request" recovery)

🤖 Generated with Claude Code

…n -f flag syntax

The `gh api -f 'comments[0][path]=...'` syntax converts array indices to
object keys, sending `{"0": {...}}` instead of `[{...}]`. GitHub rejects
this, causing the bot to waste a tool call recovering on every review with
inline comments.

Switch the documented example to use a JSON payload file with `--input`,
which is the pattern the bot already discovers on recovery and is consistent
with running-in-ci guidance.

Closes #1409

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty
max-sixty merged commit a790c0b into main Mar 9, 2026
22 checks passed
@max-sixty
max-sixty deleted the hourly/review-22852797352 branch March 9, 2026 15:47
worktrunk-bot added a commit that referenced this pull request Mar 10, 2026
…oad example

The example introduced in #1410 referenced /tmp/review-body.md without
showing how to create it, making the example incomplete. Add the missing
heredoc so agents following the example don't fail at the cat step.

Closes #1417

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review-pr: skill documents broken gh api flag syntax for review comments

2 participants