Compare commits

..

9 Commits

Author SHA1 Message Date
dependabot[bot]
ff359d06dc Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 18:56:53 +00:00
Sneha Kripanandan
ed597411d8 Merge pull request #653 from actions/sneha-krip/readme-for-v8
README for updating actions/github-script from v7 to v8
2025-09-04 10:48:16 -04:00
Sneha Kripanandan
2dc352e4ba Bold minimum Actions Runner version in README 2025-09-04 10:43:07 -04:00
Sneha Kripanandan
01e118c8d0 Update README for Node 24 runtime requirements 2025-09-04 10:42:40 -04:00
Sneha Kripanandan
8b222ac82e Apply suggestion from @salmanmkc
Co-authored-by: Salman Chishti <salmanmkc@GitHub.com>
2025-09-04 10:39:58 -04:00
Sneha Kripanandan
adc0eeac99 README for updating actions/github-script from v7 to v8 2025-09-04 10:27:46 -04:00
Salman Chishti
20fe497b3f Merge pull request #637 from actions/node24
Update Node.js version support to 24.x
2025-09-04 10:55:50 +01:00
Salman Muin Kayser Chishti
e7b7f222b1 update licenses 2025-08-08 12:15:47 +01:00
Salman Muin Kayser Chishti
2c81ba05f3 Update Node.js version support to 24.x
Bump Node.js version requirement from 20.x to 24.x in action configuration and package files. Update @types/node and undici-types dependencies to match Node 24 compatibility.
2025-07-29 14:08:35 +01:00
14 changed files with 68 additions and 57 deletions

View File

@@ -5,7 +5,7 @@ runs:
steps: steps:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: '20.x' node-version: '24.x'
cache: npm cache: npm
- run: npm ci - run: npm ci

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies

View File

@@ -13,7 +13,7 @@ jobs:
ci: ci:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- run: npm run style:check - run: npm run style:check
- run: npm test - run: npm test

View File

@@ -38,7 +38,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

View File

@@ -14,7 +14,7 @@ jobs:
name: 'Integration test: return' name: 'Integration test: return'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- id: output-set - id: output-set
uses: ./ uses: ./
with: with:
@@ -34,7 +34,7 @@ jobs:
name: 'Integration test: relative-path require' name: 'Integration test: relative-path require'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- id: relative-require - id: relative-require
uses: ./ uses: ./
with: with:
@@ -52,7 +52,7 @@ jobs:
name: 'Integration test: npm package require' name: 'Integration test: npm package require'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- id: npm-require - id: npm-require
uses: ./ uses: ./
@@ -72,7 +72,7 @@ jobs:
name: 'Integration test: GraphQL previews option' name: 'Integration test: GraphQL previews option'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- id: previews-default - id: previews-default
name: Default previews not set name: Default previews not set
@@ -125,7 +125,7 @@ jobs:
name: 'Integration test: user-agent option' name: 'Integration test: user-agent option'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- id: user-agent-default - id: user-agent-default
name: Default user-agent not set name: Default user-agent not set
@@ -182,7 +182,7 @@ jobs:
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})" name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- id: debug-default - id: debug-default
name: Default debug not set name: Default debug not set
@@ -256,7 +256,7 @@ jobs:
name: 'Integration test: base-url option' name: 'Integration test: base-url option'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./.github/actions/install-dependencies - uses: ./.github/actions/install-dependencies
- id: base-url-default - id: base-url-default

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Check licenses name: Check licenses
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 # prefer to use a full fetch for licensed workflows fetch-depth: 0 # prefer to use a full fetch for licensed workflows
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0 - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0

View File

@@ -14,7 +14,7 @@ jobs:
steps: steps:
- name: Checking out - name: Checking out
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Publish - name: Publish
id: publish id: publish
uses: actions/publish-immutable-action@0.0.4 uses: actions/publish-immutable-action@0.0.4

View File

@@ -13,7 +13,7 @@ jobs:
pull-request-test: pull-request-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: ./ - uses: ./
with: with:
script: | script: |

View File

@@ -1,6 +1,6 @@
--- ---
name: "@types/node" name: "@types/node"
version: 20.9.0 version: 24.1.0
type: npm type: npm
summary: TypeScript definitions for node summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node

View File

@@ -1,15 +1,17 @@
--- ---
name: undici-types name: undici-types
version: 5.26.5 version: 7.8.0
type: npm type: npm
summary: A stand-alone types package for Undici summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org homepage: https://undici.nodejs.org
license: mit license: mit
licenses: licenses:
- sources: Auto-generated MIT license text - sources: LICENSE
text: | text: |
MIT License MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights

View File

@@ -53,6 +53,14 @@ documentation.
## Breaking Changes ## Breaking Changes
### V8
Version 8 of this action updated the runtime to Node 24 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions
All scripts are now run with Node 24 instead of Node 20 and are affected by any breaking changes between Node 20 and 24.
**This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1)**
### V7 ### V7
Version 7 of this action updated the runtime to Node 20 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions Version 7 of this action updated the runtime to Node 20 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions
@@ -91,7 +99,7 @@ and potential `SyntaxError`s when the expression is not valid JavaScript code (p
To pass inputs, set `env` vars on the action step and reference them in your script with `process.env`: To pass inputs, set `env` vars on the action step and reference them in your script with `process.env`:
```yaml ```yaml
- uses: actions/github-script@v7 - uses: actions/github-script@v8
env: env:
TITLE: ${{ github.event.pull_request.title }} TITLE: ${{ github.event.pull_request.title }}
with: with:
@@ -110,7 +118,7 @@ The return value of the script will be in the step's outputs under the
"result" key. "result" key.
```yaml ```yaml
- uses: actions/github-script@v7 - uses: actions/github-script@v8
id: set-result id: set-result
with: with:
script: return "Hello!" script: return "Hello!"
@@ -129,7 +137,7 @@ output of a github-script step. For some workflows, string encoding is preferred
`result-encoding` input: `result-encoding` input:
```yaml ```yaml
- uses: actions/github-script@v7 - uses: actions/github-script@v8
id: my-script id: my-script
with: with:
result-encoding: string result-encoding: string
@@ -141,7 +149,7 @@ output of a github-script step. For some workflows, string encoding is preferred
By default, requests made with the `github` instance will not be retried. You can configure this with the `retries` option: By default, requests made with the `github` instance will not be retried. You can configure this with the `retries` option:
```yaml ```yaml
- uses: actions/github-script@v7 - uses: actions/github-script@v8
id: my-script id: my-script
with: with:
result-encoding: string result-encoding: string
@@ -159,7 +167,7 @@ In this example, request failures from `github.rest.issues.get()` will be retrie
You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option: You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option:
```yaml ```yaml
- uses: actions/github-script@v7 - uses: actions/github-script@v8
id: my-script id: my-script
with: with:
result-encoding: string result-encoding: string
@@ -188,7 +196,7 @@ By default, github-script will use the token provided to your workflow.
```yaml ```yaml
- name: View context attributes - name: View context attributes
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: console.log(context) script: console.log(context)
``` ```
@@ -204,7 +212,7 @@ jobs:
comment: comment:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
github.rest.issues.createComment({ github.rest.issues.createComment({
@@ -226,7 +234,7 @@ jobs:
apply-label: apply-label:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
github.rest.issues.addLabels({ github.rest.issues.addLabels({
@@ -248,7 +256,7 @@ jobs:
welcome: welcome:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
// Get a list of all issues created by the PR opener // Get a list of all issues created by the PR opener
@@ -293,7 +301,7 @@ jobs:
diff: diff:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const diff_url = context.payload.pull_request.diff_url const diff_url = context.payload.pull_request.diff_url
@@ -317,7 +325,7 @@ jobs:
list-issues: list-issues:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const query = `query($owner:String!, $name:String!, $label:String!) { const query = `query($owner:String!, $name:String!, $label:String!) {
@@ -351,7 +359,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const script = require('./path/to/script.js') const script = require('./path/to/script.js')
@@ -389,7 +397,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/github-script@v7 - uses: actions/github-script@v8
env: env:
SHA: '${{env.parentSHA}}' SHA: '${{env.parentSHA}}'
with: with:
@@ -433,7 +441,7 @@ jobs:
- run: npm ci - run: npm ci
# or one-off: # or one-off:
- run: npm install execa - run: npm install execa
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const execa = require('execa') const execa = require('execa')
@@ -463,7 +471,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const { default: printStuff } = await import('${{ github.workspace }}/src/print-stuff.js') const { default: printStuff } = await import('${{ github.workspace }}/src/print-stuff.js')
@@ -507,7 +515,7 @@ jobs:
apply-label: apply-label:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
github-token: ${{ secrets.MY_PAT }} github-token: ${{ secrets.MY_PAT }}
script: | script: |
@@ -531,7 +539,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const exitCode = await exec.exec('echo', ['hello']) const exitCode = await exec.exec('echo', ['hello'])
@@ -549,7 +557,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/github-script@v7 - uses: actions/github-script@v8
with: with:
script: | script: |
const { const {

View File

@@ -36,5 +36,5 @@ outputs:
result: result:
description: The return value of the script, stringified with `JSON.stringify` description: The return value of the script, stringified with `JSON.stringify`
runs: runs:
using: node20 using: node24
main: dist/index.js main: dist/index.js

34
package-lock.json generated
View File

@@ -17,7 +17,7 @@
"@octokit/core": "^5.0.1", "@octokit/core": "^5.0.1",
"@octokit/plugin-request-log": "^4.0.0", "@octokit/plugin-request-log": "^4.0.0",
"@octokit/plugin-retry": "^6.0.1", "@octokit/plugin-retry": "^6.0.1",
"@types/node": "^20.9.0" "@types/node": "^24.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.5", "@types/jest": "^29.5.5",
@@ -35,7 +35,7 @@
"typescript": "^5.2.2" "typescript": "^5.2.2"
}, },
"engines": { "engines": {
"node": ">=20.0.0 <21.0.0" "node": ">=24"
} }
}, },
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
@@ -1672,11 +1672,12 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.9.0", "version": "24.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~7.8.0"
} }
}, },
"node_modules/@types/semver": { "node_modules/@types/semver": {
@@ -7113,9 +7114,10 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "5.26.5", "version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
"license": "MIT"
}, },
"node_modules/universal-user-agent": { "node_modules/universal-user-agent": {
"version": "6.0.0", "version": "6.0.0",
@@ -8652,11 +8654,11 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "20.9.0", "version": "24.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
"requires": { "requires": {
"undici-types": "~5.26.4" "undici-types": "~7.8.0"
} }
}, },
"@types/semver": { "@types/semver": {
@@ -12542,9 +12544,9 @@
} }
}, },
"undici-types": { "undici-types": {
"version": "5.26.5", "version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="
}, },
"universal-user-agent": { "universal-user-agent": {
"version": "6.0.0", "version": "6.0.0",

View File

@@ -1,15 +1,14 @@
{ {
"name": "@actions/github-script", "name": "@actions/github-script",
"description": "A GitHub action for executing a simple script", "description": "A GitHub action for executing a simple script",
"engines": {
"node": ">=24"
},
"version": "7.0.1", "version": "7.0.1",
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
"types": "types/async-function.d.ts", "types": "types/async-function.d.ts",
"private": true,
"engines": {
"node": ">=20.0.0 <21.0.0"
},
"scripts": { "scripts": {
"build": "npm run build:types && ncc build src/main.ts", "build": "npm run build:types && ncc build src/main.ts",
"build:types": "tsc src/async-function.ts -t es5 --declaration --allowJs --emitDeclarationOnly --outDir types", "build:types": "tsc src/async-function.ts -t es5 --declaration --allowJs --emitDeclarationOnly --outDir types",
@@ -47,7 +46,7 @@
"@octokit/core": "^5.0.1", "@octokit/core": "^5.0.1",
"@octokit/plugin-request-log": "^4.0.0", "@octokit/plugin-request-log": "^4.0.0",
"@octokit/plugin-retry": "^6.0.1", "@octokit/plugin-retry": "^6.0.1",
"@types/node": "^20.9.0" "@types/node": "^24.1.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.5", "@types/jest": "^29.5.5",