Upgrade @actions/github to v9 and @octokit/core to v7+#708
Upgrade @actions/github to v9 and @octokit/core to v7+#708
Conversation
- @actions/github: ^6.0.0 → ^9.0.0 - @octokit/core: ^5.0.1 → ^7.0.0 - @octokit/plugin-request-log: ^4.0.0 → ^6.0.0 - @octokit/plugin-retry: ^6.0.1 → ^8.0.0 - Update tsconfig.json to use moduleResolution: "bundler" for ESM exports map support - Update import paths for new package structures - Update build:types script for compatible compiler options Co-authored-by: angel-jiakou <115738347+angel-jiakou@users.noreply.github.com> Agent-Logs-Url: https://github.com/actions/github-script/sessions/17de5ca1-8bdc-41e4-a06d-ab2d8c2e6e8c
|
Hello from actions/github-script! (f3724d5) |
There was a problem hiding this comment.
Pull request overview
Upgrades the Action’s GitHub/Octokit dependencies to ESM-only major versions and updates the TypeScript + test/build configuration and import paths to remain compatible.
Changes:
- Upgrade
@actions/githubto v9 and@octokit/*dependencies to their v6/v7/v8 major versions. - Update TypeScript compilation settings for ESM (
target/module es2022,moduleResolution: bundler) and adjustts-jestto keep tests running in CJS. - Fix type/import paths impacted by the new packages’
exportsmaps and relax integration workflow user-agent assertions.
Reviewed changes
Copilot reviewed 28 out of 34 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| types/async-function.d.ts | Updates exported argument types to avoid removed @actions/github/lib/context path. |
| tsconfig.json | Switches project TS target/module to ES2022 and module resolution to bundler. |
| src/retry-options.ts | Updates Octokit type import to the new v7 exported subpath. |
| src/async-function.ts | Adjusts context typing approach to match @actions/github v9 export map changes. |
| package.json | Bumps deps, updates build:types, and adds ts-jest TS overrides. |
| package-lock.json | Lockfile updates for the new dependency graph and transitive packages. |
| .licenses/npm/wrappy.dep.yml | Removes cached license entry (dependency no longer in licensed set). |
| .licenses/npm/universal-user-agent.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/undici-6.24.1.dep.yml | Corrects cached license metadata to match undici@6.24.1. |
| .licenses/npm/undici-5.28.5.dep.yml | Adds cached license metadata for undici@5.28.5. |
| .licenses/npm/once.dep.yml | Removes cached license entry (dependency no longer in licensed set). |
| .licenses/npm/json-with-bigint.dep.yml | Adds cached license metadata for new transitive dependency. |
| .licenses/npm/fast-content-type-parse.dep.yml | Adds cached license metadata for new transitive dependency. |
| .licenses/npm/deprecation.dep.yml | Removes cached license entry (dependency removed from graph). |
| .licenses/npm/before-after-hook.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/types.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/types-12.0.0.dep.yml | Removes cached license entry for superseded version. |
| .licenses/npm/@octokit/request.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/request-error.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/plugin-retry.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/plugin-request-log.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/plugin-paginate-rest.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/openapi-types.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/openapi-types-19.0.0.dep.yml | Removes cached license entry for superseded version. |
| .licenses/npm/@octokit/graphql.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/endpoint.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@octokit/core.dep.yml | Updates cached license metadata version for direct dependency bump. |
| .licenses/npm/@octokit/auth-token.dep.yml | Updates cached license metadata version for transitive bump. |
| .licenses/npm/@actions/http-client-3.0.2.dep.yml | Adds cached license metadata for new transitive version. |
| .licenses/npm/@actions/http-client-2.2.0.dep.yml | Adds cached license metadata for existing transitive version. |
| .licenses/npm/@actions/github.dep.yml | Updates cached license metadata version for direct dependency bump. |
| .github/workflows/integration.yml | Adjusts user-agent integration assertions to allow the new user-agent format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import {context as _ghContext, GitHub} from '@actions/github/lib/utils' | ||
| import * as glob from '@actions/glob' |
There was a problem hiding this comment.
@actions/github/lib/utils is a deep import that isn’t part of the stable public API surface and has already changed once (lib/context disappeared in v9). Since this import is only used to derive types, prefer using public exports from @actions/github (e.g., typeof context for context and ReturnType<typeof getOctokit> for github/octokit) and make the import type-only so it can’t accidentally become a runtime dependency.
Upgrades
@actions/githubfrom v6 to v9 and@octokit/corefrom v5 to v7, which are ESM-only packages requiring TypeScript module resolution changes.Dependency versions
@actions/github^6.0.0^9.0.0@octokit/core^5.0.1^7.0.0@octokit/plugin-request-log^4.0.0^6.0.0@octokit/plugin-retry^6.0.1^8.0.0TypeScript config (
tsconfig.json)moduleResolution: "bundler"— required for ESMexportsmap resolution in @octokit/core v7 and @actions/github v9module: "es2022"— required by bundler resolutiontarget: "es2022"— needed forErrorOptionstype used in @octokit/request-errormodule: "commonjs"override to preserve CJS test executionImport path fixes
src/retry-options.ts:@octokit/core/dist-types/types→@octokit/core/types(v7 subpath export)src/async-function.ts:@actions/github/lib/contextis no longer in the v9exportsmap. Replaced withtypeof contextderived from@actions/github/lib/utils:Build script
Updated
build:typesto pass--target es2022 --module es2022 --moduleResolution bundlersince it specifies files directly (bypasses tsconfig.json).💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.