Upgrade @actions/github to ^9.0.0 and @octokit/request-error to ^7.1.0#678
Merged
Conversation
jeffwidman
previously approved these changes
Mar 26, 2026
Breaking changes addressed: - @actions/github 9.0.0: Package is now ESM-only. The ./lib/context subpath is no longer in the exports map, so a local github-context.ts shim derives the Context type and constructor from the context singleton. - @octokit/request-error 7.x: Removed headers from RequestErrorOptions. Updated test constructor call accordingly. - @octokit/request-error bumped to ^7.1.0 to align with the version used transitively by @actions/github 9.x (prevents instanceof mismatches).
fe03af9 to
a9f8204
Compare
jeffwidman
approved these changes
Mar 26, 2026
Member
jeffwidman
left a comment
There was a problem hiding this comment.
Let's ship this, and explore the context question later as a follow-up if interested.
| import * as github from '@actions/github' | ||
|
|
||
| // Re-export the Context type derived from the context singleton. | ||
| // @actions/github v9 does not export the Context class directly from its exports map. |
Member
There was a problem hiding this comment.
🤔 I wonder why? does that hint at that we should migrate away from this direct import ourselves?
Semi-out-of-scope for this PR.
truggeri
commented
Mar 26, 2026
| jest.spyOn(util, 'getBranchNames').mockReturnValue({ headName: 'dependabot|nuget|feature1', baseName: 'main' }) | ||
| jest.spyOn(dependabotCommits, 'getMessage').mockImplementation(jest.fn( | ||
| () => Promise.reject(new RequestError('Something bad happened!', 500, { | ||
| headers: {}, |
Contributor
Author
There was a problem hiding this comment.
This was referenced May 15, 2026
Merged
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
Part 3 of a larger update, see #673 .
Upgrades
@actions/githubfrom^6.0.1to^9.0.0and@octokit/request-errorfrom^5.1.1to^7.1.0.Breaking changes
@actions/github9.0.0: Package is now ESM-only. The./lib/contextsubpath is no longer in the exports map, so a localgithub-context.tsshim is added that derives theContexttype and constructor from thecontextsingleton.@octokit/request-error7.x:headersremoved fromRequestErrorOptions. Updated the test constructor call insrc/main.test.ts.@octokit/request-errorbumped to^7.1.0to align with the version used transitively by@actions/github9.x (preventsinstanceofmismatches).Files changed
Contextfrom local shim instead of@actions/github/lib/contextheadersfromRequestErrorconstructor optionsDependencies