Skip to content

fix(ipr): wrap createStatus payload so state reaches GitHub API#3035

Merged
bokelley merged 1 commit intomainfrom
bokelley/fix-ipr-create-status-body
Apr 24, 2026
Merged

fix(ipr): wrap createStatus payload so state reaches GitHub API#3035
bokelley merged 1 commit intomainfrom
bokelley/fix-ipr-create-status-body

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

One-line fix to scripts/ipr/github.mjs createStatus. Payload was being passed at the top level of the request options where request() expects it nested under body:. Result: outgoing request had no body, GitHub responded 422 Validation Failed: State is not included in the list.

Impact

Every PR's ipr-check has been failing since #3011 landed. Both the pending ("awaiting signature") and success ("already signed") status calls hit the same broken createStatus path. All currently-open PRs — mine, the 5.16 bump (#3034), the triage improvement chain (#3023, #3033), and every dependabot/feature PR — are red on this check.

Fix

Wrap the payload in { body: { ... } } so it actually gets sent. createIssueComment and updateIssueComment were already wrapping correctly; this restores symmetry.

 createStatus(owner, repo, sha, { state, context, description, targetUrl }) {
   return this.request('POST', `/repos/${owner}/${repo}/statuses/${sha}`, {
-    state,
-    context,
-    description: description?.slice(0, 140),
-    target_url: targetUrl,
+    body: {
+      state,
+      context,
+      description: description?.slice(0, 140),
+      target_url: targetUrl,
+    },
   });
 }

Branch protection note

This PR's own ipr-check will fail (the workflow checks out from main, where the bug still exists). Needs admin bypass on that check to merge, after which every subsequent PR's ipr-check will start working.

Test plan

🤖 Generated with Claude Code

request(method, path, { body, query }) reads the payload from
options.body. createIssueComment and updateIssueComment wrap correctly;
createStatus was passing fields at the top level so the outgoing
request had no body. GitHub responded 422 "Validation Failed: State is
not included in the list" on every ipr-check run since the workflow
rewrite in #3011 — pending and success statuses both hit the same
path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit d75bcec into main Apr 24, 2026
10 of 11 checks passed
@bokelley bokelley deleted the bokelley/fix-ipr-create-status-body branch April 24, 2026 15:22
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.

1 participant