Dashboardcraftgh api review replies/reviewers: form s…

gh api review replies/reviewers: form strings 422 — use JSON body

Category: gotcha
Confidence: 1.00
ID: 019fdd1b-e044-7be9-b15b-f91504639452
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 1LCorxku9DNLu5w5f
Created: 2026-08-07 16:43:39
Updated: 2026-08-07 16:43:39

Content

gh api review endpoints reject form-encoded strings: gh api -f in_reply_to=3730403846 -f commit_id=... returns HTTP 422 (oneOf subschema) because -f sends strings and in_reply_to must be an INTEGER; positioning (commit_id/path/line, or position) is also required. Fix: POST a raw JSON body via -d/--input, passing in_reply_to as a number plus valid positioning. Same class of bug: POST /pulls/{n}/review-requests requires reviewers as a REAL JSON array ({"reviewers": ["BYK"]}) — a JSON-encoded string "[\"BYK\"]" also 422s. Both hit during PR #865 review cleanup.

Move to: