fix(ipr): wrap createStatus payload so state reaches GitHub API#3035
Merged
fix(ipr): wrap createStatus payload so state reaches GitHub API#3035
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-line fix to
scripts/ipr/github.mjscreateStatus. Payload was being passed at the top level of the request options whererequest()expects it nested underbody:. Result: outgoing request had no body, GitHub responded422 Validation Failed: State is not included in the list.Impact
Every PR's
ipr-checkhas been failing since #3011 landed. Both the pending ("awaiting signature") and success ("already signed") status calls hit the same brokencreateStatuspath. 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.createIssueCommentandupdateIssueCommentwere 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-checkwill fail (the workflow checks out frommain, where the bug still exists). Needs admin bypass on that check to merge, after which every subsequent PR'sipr-checkwill start working.Test plan
ipr-checkshould transition to pass🤖 Generated with Claude Code