actions/github-script

Infrastructure & DevOpsMIT

Runs a JavaScript snippet with an authenticated GitHub API client.

Latest v9.0.0 · by GitHubWritten in TypeScriptWebsiteactions/github-scriptRSS

Changelog

v9.0.0

Latest
Added 2
  • Added a getOctokit factory function available directly in the script context for creating additional authenticated Octokit clients with different tokens
  • The ACTIONS_ORCHESTRATION_ID environment variable is automatically appended to the user-agent string for request tracing
Changed 3
  • Upgraded @actions/github to v9 (ESM-only), which causes require('@actions/github') to fail at runtime in scripts
  • getOctokit is now an injected function parameter, so scripts declaring const or let getOctokit will throw a SyntaxError
  • Scripts accessing other @actions/github internals beyond the standard github/octokit client may need updates for v9 compatibility

From actions/github-script

New features:

  • getOctokit factory function — Available directly in the script context. Create additional authenticated Octokit clients with different tokens for multi-token workflows, GitHub App tokens, and cross-org access. See Creating additional clients with getOctokit for details and examples.
  • Orchestration ID in user-agent — The ACTIONS_ORCHESTRATION_ID environment variable is automatically appended to the user-agent string for request tracing.

Breaking changes:

  • require('@actions/github') no longer works in scripts. The upgrade to @actions/github v9 (ESM-only) means require('@actions/github') will fail at runtime. If you previously used patterns like const { getOctokit } = require('@actions/github') to create secondary clients, use the new injected getOctokit function instead — it's available directly in the script context with no imports needed.
  • getOctokit is now an injected function parameter. Scripts that declare const getOctokit = ... or let getOctokit = ... will get a SyntaxError because JavaScript does not allow const/let redeclaration of function parameters. Use the injected getOctokit directly, or use var getOctokit = ... if you need to redeclare it.
  • If your script accesses other @actions/github internals beyond the standard github/octokit client, you may need to update those references for v9 compatibility.
What's Changed
New Contributors

Full Changelog: https://github.com/actions/github-script/compare/v8.0.0...v9.0.0

View originalPermalink
How v9.0.0 went
v8

v8.0.0

Changed 1
  • Update Node.js version support to 24.x
View originalRead the notes
How v8 went

v7.1.0

Added 5
  • Add workflow file for publishing releases to immutable action package
  • Add Dependabot for NPM and Actions
  • Add Dependabot for .github/actions/install-dependencies
  • Make octokit instance available as octokit on top of github, to make it easier to seamlessly copy examples from GitHub REST API or Octokit documentation
  • Add exec usage examples to documentation
Changed 12
  • Upgrade husky to v9
  • Upgrade IA Publish
  • Update usage of actions/upload-artifact
  • Clear up package name confusion
  • Update dependencies with npm audit fix
  • Specify that the used script is JavaScript
Fixed 1
  • Fix workflow status badges
Removed 2
  • Remove .vscode settings
  • Remove octokit README updates for v7
View originalRead the notes
How v7.1.0 went

v7.0.1

Fixed 1
  • Avoid setting baseUrl to undefined when input is not provided
View originalRead the notes
How v7.0.1 went

v7.0.0

Added 2
  • Add base-url option
  • Expose async-function argument type for use with JSDoc support in scripts
Changed 1
  • Update dependencies and use Node 20
View originalRead the notes
How v7.0.0 went

v2.1.0

Changed 1
  • Bumped @actions/core to 1.10.0 for v2
View originalRead the notes
How v2.1.0 went

v6.4.1

Added 1
  • Add @octokit/plugin-request-log to produce debug output for requests
Changed 1
  • Default debug to the current runner debug state
Fixed 1
  • Fix input handling
Removed 1
  • Remove unused dependencies
View originalRead the notes
How v6.4.1 went

v4.2.0

Changed 1
  • Upgraded @actions/core to 1.10.0 for v4
View originalRead the notes
How v4.2.0 went

v5.2.0

Changed 1
  • Upgraded @actions/core to 1.10.0 for v5
View originalRead the notes
How v5.2.0 went

v3.2.0

Changed 1
  • Upgraded @actions/core to 1.10.0 for v3
View originalRead the notes
How v3.2.0 went
View all

Discussion

If you publish actions/github-script, you can claim this product by proving you administer its repository.