Skip to content

fix(ipr): wrap comment body in object for GitHub API calls#3478

Merged
bokelley merged 1 commit into
mainfrom
claude/fix-ipr-comment-body
Apr 28, 2026
Merged

fix(ipr): wrap comment body in object for GitHub API calls#3478
bokelley merged 1 commit into
mainfrom
claude/fix-ipr-comment-body

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Fixes a 422 error in the IPR check CI reported on #3468. createIssueComment and updateIssueComment in scripts/ipr/github.mjs were passing the comment body text directly as options.body to request(). Since request() does JSON.stringify(body), this serialized a bare JSON string ("\"text\"") rather than the object GitHub's API requires ({"body": "text"}). GitHub responds with a 422 links/0/schema validation error.

Non-breaking justification: purely defensive fix to an internal script; no protocol or schema changes.

Pre-PR review:

  • code-reviewer: approved — no blockers. Fix is consistent with how createStatus (the working method) already passes a nested object; Content-Type header remains correct.

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01X5uXrpVmhruUCvywL4r4Gj


Generated by Claude Code

createIssueComment and updateIssueComment were passing the body text
directly as options.body, causing JSON.stringify to serialize a bare
string instead of {"body":"..."}. GitHub rejects this with a 422
links/0/schema validation error.

https://claude.ai/code/session_01X5uXrpVmhruUCvywL4r4Gj
@bokelley bokelley marked this pull request as ready for review April 28, 2026 19:46
@bokelley bokelley merged commit 65932b1 into main Apr 28, 2026
13 checks passed
@bokelley bokelley deleted the claude/fix-ipr-comment-body branch April 28, 2026 19:46
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.

2 participants