Repository navigation
SRE-10162: Pin the REST API version to 2026-03-10 - #10
Merged
Merged
Conversation
Under the default 2022-11-28 the dispatch endpoint is deprecated (removal 2028-03-10); 2026-03-10 always returns run details.
The org requires SHA-pinned actions; Build & Test has failed at startup since September without this.
This branch was successfully deployed
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.
Backports upstream benc-uk/workflow-dispatch benc-uk#103 (pin the REST API version). Every dispatch from cookieai-core currently logs:
That's because requests without a version header get
2022-11-28.Changes:
src/main.ts: both client constructions (token and GitHub App) sendx-github-api-version: 2026-03-10on every request through an Octokithook.before. That includesapps.listInstallations, workflow listing, runs, jobs, logs and artifacts. Per GitHub's 2026-03-10 breaking-changes list, none of those endpoints change.src/workflow-handler.ts: dropsreturn_run_details, which is removed in 2026-03-10. The dispatch endpoint now always returns200withworkflow_run_id/html_url, which the existing code already reads, and the polling fallback stays.dist/index.jsrebuilt withnpm run build..github/workflows/build-test.yaml,retrieve-logs.yml: all 34 action refs pinned to commit SHAs. The org requires SHA pins, and Build & Test has failed at startup since 2026-09-28 because of it. Theactions/*SHAs reuse the cookieai-core pins.nick-invision/assert-actionv3.0.0 is22dd2a6.mikeal/publish-to-github-actionis pinned to its current mastere5a27bb(last change 2020).Other upstream changes since the fork were reviewed and are already here (benc-uk#77 path matching, benc-uk#79 PR ref default, benc-uk#49 disabled workflows) or not needed (benc-uk#97 pending status, since our wait loop runs until
completed; benc-uk#112, since our input parser already throws; benc-uk#98, since we havewait-for-completion-interval).Testing:
x-github-api-version-selected: 2026-03-10; paginated workflow listing and run listing work.echo-1.yamlon this branch with the hook:200, nodeprecationheader,workflow_run_idandhtml_urlpresent.buildpasses. Every test job fails with401 Bad credentialsfrom thePERSONAL_TOKENsecret (last updated 2026-03-31). That token needs rotating, or the tests moved to the GitHub App, before the suite can run.Note: #9 also rebuilds
dist/index.js. Whichever merges second needs a rebase andnpm run build.