From f2f7f58db48df7d531a0c3605f9d676c491898ec Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 3 Jun 2024 18:22:32 -0400 Subject: [PATCH 01/22] ci: Use github/setup-licensed --- .github/workflows/licensed.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 7afc7a30..66cfac5c 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -16,9 +16,12 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # prefer to use a full fetch for licensed workflows - # https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1 - - uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2 + - uses: ruby/setup-ruby@v1 with: - version: '3.x' + ruby-version: ruby + - uses: github/setup-licensed@v1 + with: + version: '4.x' + github_token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/install-dependencies - run: licensed status From fd2cfc12fa2eb818c6d8e4174277d6da3f69504b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 10 Jun 2024 18:16:25 -0400 Subject: [PATCH 02/22] ci: pin ruby/setup-ruby --- .github/workflows/licensed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 66cfac5c..0c510aee 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # prefer to use a full fetch for licensed workflows - - uses: ruby/setup-ruby@v1 + - uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 # v1.213.0 with: ruby-version: ruby - uses: github/setup-licensed@v1 From 19e58d85259764f164c9e2f299847c1742cca11d Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 28 Jan 2025 16:50:07 -0500 Subject: [PATCH 03/22] Define `permissions` in workflows and update actions --- .../actions/install-dependencies/action.yml | 2 +- .github/workflows/check-dist.yml | 5 ++- .github/workflows/ci.yml | 5 ++- .github/workflows/codeql-analysis.yml | 8 ++--- .github/workflows/integration.yml | 17 +++++----- .github/workflows/licensed.yml | 5 ++- .../workflows/publish-immutable-actions.yml | 2 +- .github/workflows/pull-request-test.yml | 12 ++++--- .github/workflows/stale.yml | 31 ------------------- README.md | 10 +++--- 10 files changed, 41 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/stale.yml diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index c5f23930..362c9325 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -3,7 +3,7 @@ description: 'Set up node and install dependencies' runs: using: 'composite' steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '20.x' cache: npm diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index ce3b9f36..6a10549b 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -13,12 +13,15 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + jobs: check-dist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd2216d9..f5619e9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,11 +6,14 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: ci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - run: npm run style:check - run: npm test diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f08e1270..fd0e0b12 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -56,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -69,4 +69,4 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 720dca11..346a57f2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -6,12 +6,15 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: test-return: name: 'Integration test: return' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: output-set uses: ./ with: @@ -31,7 +34,7 @@ jobs: name: 'Integration test: relative-path require' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: relative-require uses: ./ with: @@ -49,7 +52,7 @@ jobs: name: 'Integration test: npm package require' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - id: npm-require uses: ./ @@ -69,7 +72,7 @@ jobs: name: 'Integration test: GraphQL previews option' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - id: previews-default name: Default previews not set @@ -122,7 +125,7 @@ jobs: name: 'Integration test: user-agent option' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - id: user-agent-default name: Default user-agent not set @@ -179,7 +182,7 @@ jobs: name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - id: debug-default name: Default debug not set @@ -253,7 +256,7 @@ jobs: name: 'Integration test: base-url option' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/install-dependencies - id: base-url-default diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 7afc7a30..98fd44a6 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -8,12 +8,15 @@ on: branches: - main +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest name: Check licenses steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # prefer to use a full fetch for licensed workflows # https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1 diff --git a/.github/workflows/publish-immutable-actions.yml b/.github/workflows/publish-immutable-actions.yml index 87c02072..3a60acbf 100644 --- a/.github/workflows/publish-immutable-actions.yml +++ b/.github/workflows/publish-immutable-actions.yml @@ -17,4 +17,4 @@ jobs: uses: actions/checkout@v4 - name: Publish id: publish - uses: actions/publish-immutable-action@0.0.3 + uses: actions/publish-immutable-action@0.0.4 diff --git a/.github/workflows/pull-request-test.yml b/.github/workflows/pull-request-test.yml index fb87ec3a..3dec9d5a 100644 --- a/.github/workflows/pull-request-test.yml +++ b/.github/workflows/pull-request-test.yml @@ -5,11 +5,15 @@ on: branches: [main] types: [opened, synchronize] +permissions: + contents: read + pull-requests: write + jobs: pull-request-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./ with: script: | @@ -20,9 +24,9 @@ jobs: issue_number: context.payload.number, }) - // Find any comment already made by the bot. - const botComment = comments.find(comment => comment.user.id === 41898282) - const commentBody = "Hello from actions/github-script! (${{ github.sha }})" + // Find any comment already made by the bot. + const botComment = comments.find(comment => comment.user.id === 41898282) + const commentBody = "Hello from actions/github-script! (${{ github.sha }})" if (context.payload.pull_request.head.repo.full_name !== 'actions/github-script') { console.log('Not attempting to write comment on PR from fork'); diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 7a3b654a..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Stale Issues & PRs - -on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: - -jobs: - mark_stale: - name: Mark issues and PRs as stale - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - exempt-issue-labels: Not Stale - exempt-pr-labels: Not Stale - stale-issue-message: > - This issue is stale because it has been open for 60 days with no - activity. Remove the "Stale" label or comment on the issue, or it - will be closed in 7 days. - stale-pr-message: > - This pull request is stale because it has been open for 60 days - with no activity. Remove the "Stale" label or comment on the pull - request, or it will be closed in 7 days. - close-issue-message: > - This issue has been marked as stale and closed due to no activity - on it. - close-pr-message: > - This pull request has been marked as stale and closed due to no - activity on it. diff --git a/README.md b/README.md index 7e244d07..347c75ea 100644 --- a/README.md +++ b/README.md @@ -305,7 +305,7 @@ jobs: echo-input: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v7 with: script: | @@ -343,7 +343,7 @@ jobs: echo-input: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v7 env: SHA: '${{env.parentSHA}}' @@ -381,8 +381,8 @@ jobs: echo-input: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' - run: npm ci @@ -417,7 +417,7 @@ jobs: print-stuff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/github-script@v7 with: script: | From 8e643f15301de261d72db5c77eb58cc64fce79a3 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 28 Jan 2025 17:04:29 -0500 Subject: [PATCH 04/22] chore: Add Dependabot for .github/actions/install-dependencies --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0d3376c4..901ea9f1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,11 @@ updates: schedule: interval: 'weekly' + - package-ecosystem: 'github-actions' + directory: '/.github/actions/install-dependencies' + schedule: + interval: 'weekly' + - package-ecosystem: 'npm' directory: '/' schedule: From ac230a1936761188745b2857daa890bfe96407ba Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 28 Jan 2025 17:18:57 -0500 Subject: [PATCH 05/22] chore: Remove .vscode settings --- .gitignore | 3 +-- .vscode/settings.json | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 2a275926..096746c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/node_modules/ -!/.vscode/ \ No newline at end of file +/node_modules/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b075686b..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.organizeImports": true - }, - "files.exclude": { - "**/dist": true, - "**/node_modules": true - } -} From 4024541289b51fa5d6f866f918664abf0a3afc29 Mon Sep 17 00:00:00 2001 From: Vladimir Starkov <559321+iamstarkov@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:16:37 +0100 Subject: [PATCH 06/22] make octokit instance available as octokit on top of github, to make it easier to seamless to copy examples from GitHub api or octokit documentation --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index 81df4f0e..baa2933d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,6 +62,7 @@ async function main(): Promise { require: wrapRequire, __original_require__: __non_webpack_require__, github, + octokit: github, context, core, exec, From f23cd47e296b62390cf2d698233337a463a1f8eb Mon Sep 17 00:00:00 2001 From: Vladimir Starkov Date: Fri, 31 Jan 2025 11:17:58 +0100 Subject: [PATCH 07/22] replace GitHub with octokit in the README, but keep a note of the GitHub still being available --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 347c75ea..43c29f13 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ uses the GitHub API and the workflow run context. To use this action, provide an input named `script` that contains the body of an asynchronous JavaScript function call. The following arguments will be provided: -- `github` A pre-authenticated - [octokit/rest.js](https://octokit.github.io/rest.js) client with pagination plugins +- `octokit` (and `github`) A pre-authenticated + [octokit/rest.js](https://octokit.github.io/rest.js) client _instance_ with pagination plugins - `context` An object containing the [context of the workflow run](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts) - `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package @@ -102,14 +102,14 @@ By default, requests made with the `github` instance will not be retried. You ca result-encoding: string retries: 3 script: | - github.rest.issues.get({ + octokit.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, }) ``` -In this example, request failures from `github.rest.issues.get()` will be retried up to 3 times. +In this example, request failures from `octokit.rest.issues.get()` will be retried up to 3 times. You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option: @@ -121,7 +121,7 @@ You can also configure which status codes should be exempt from retries via the retries: 3 retry-exempt-status-codes: 400,401 script: | - github.rest.issues.get({ + octokit.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -162,7 +162,7 @@ jobs: - uses: actions/github-script@v7 with: script: | - github.rest.issues.createComment({ + octokit.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -184,7 +184,7 @@ jobs: - uses: actions/github-script@v7 with: script: | - github.rest.issues.addLabels({ + octokit.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -209,12 +209,12 @@ jobs: // Get a list of all issues created by the PR opener // See: https://octokit.github.io/rest.js/#pagination const creator = context.payload.sender.login - const opts = github.rest.issues.listForRepo.endpoint.merge({ + const opts = octokit.rest.issues.listForRepo.endpoint.merge({ ...context.issue, creator, state: 'all' }) - const issues = await github.paginate(opts) + const issues = await octokit.paginate(opts) for (const issue of issues) { if (issue.number === context.issue.number) { @@ -226,7 +226,7 @@ jobs: } } - await github.rest.issues.createComment({ + await octokit.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -252,7 +252,7 @@ jobs: with: script: | const diff_url = context.payload.pull_request.diff_url - const result = await github.request(diff_url) + const result = await octokit.request(diff_url) console.log(result) ``` @@ -289,7 +289,7 @@ jobs: name: context.repo.repo, label: 'wontfix' } - const result = await github.graphql(query, variables) + const result = await octokit.graphql(query, variables) console.log(result) ``` @@ -310,13 +310,13 @@ jobs: with: script: | const script = require('./path/to/script.js') - console.log(script({github, context})) + console.log(script({octokit, context})) ``` And then export a function from your module: ```javascript -module.exports = ({github, context}) => { +module.exports = ({octokit, context}) => { return context.payload.client_payload.value } ``` @@ -350,15 +350,15 @@ jobs: with: script: | const script = require('./path/to/script.js') - await script({github, context, core}) + await script({octokit, context, core}) ``` And then export an async function from your module: ```javascript -module.exports = async ({github, context, core}) => { +module.exports = async ({octokit, context, core}) => { const {SHA} = process.env - const commit = await github.rest.repos.getCommit({ + const commit = await octokit.rest.repos.getCommit({ owner: context.repo.owner, repo: context.repo.repo, ref: `${SHA}` @@ -487,7 +487,7 @@ jobs: with: github-token: ${{ secrets.MY_PAT }} script: | - github.rest.issues.addLabels({ + octokit.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, From 632050422e978842abd9ac9264eef6693308f34c Mon Sep 17 00:00:00 2001 From: Vladimir Starkov Date: Fri, 31 Jan 2025 11:55:53 +0100 Subject: [PATCH 08/22] fix: adjust types --- dist/index.js | 1 + src/async-function.ts | 1 + types/async-function.d.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/dist/index.js b/dist/index.js index c615a069..bb06b77b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -36286,6 +36286,7 @@ async function main() { require: wrapRequire, __original_require__: require, github, + octokit: github, context: lib_github.context, core: core, exec: exec, diff --git a/src/async-function.ts b/src/async-function.ts index a60af875..84035f22 100644 --- a/src/async-function.ts +++ b/src/async-function.ts @@ -11,6 +11,7 @@ export declare type AsyncFunctionArguments = { context: Context core: typeof core github: InstanceType + octokit: InstanceType exec: typeof exec glob: typeof glob io: typeof io diff --git a/types/async-function.d.ts b/types/async-function.d.ts index 910a6249..b204e363 100644 --- a/types/async-function.d.ts +++ b/types/async-function.d.ts @@ -9,6 +9,7 @@ export declare type AsyncFunctionArguments = { context: Context; core: typeof core; github: InstanceType; + octokit: InstanceType; exec: typeof exec; glob: typeof glob; io: typeof io; From 86ac1371eac0dc7e160d1a54b09b001fbac372cb Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 17 Feb 2025 11:50:46 +0100 Subject: [PATCH 09/22] docs: add "exec" usage examples --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 43c29f13..635eabd0 100644 --- a/README.md +++ b/README.md @@ -494,3 +494,45 @@ jobs: labels: ['Triage'] }) ``` + +### Using exec package + +The provided [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package allows to execute command or tools in a cross platform way: + +```yaml +on: push + +jobs: + use-exec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + with: + script: | + const exitCode = await exec.exec('echo', ['hello']) + + console.log(exitCode) +``` + +`exec` packages provides `getExecOutput` function to retrieve stdout and stderr from executed command: + +```yaml +on: push + +jobs: + use-get-exec-output: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + with: + script: | + const { + exitCode, + stdout, + stderr + } = await exec.getExecOutput('echo', ['hello']); + + console.log(exitCode, stdout, stderr) +``` From 851500a2ad074568533e96b6a6779c2b00873d2e Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Wed, 26 Feb 2025 14:38:00 -0500 Subject: [PATCH 10/22] Remove `octokit` README updates for v7 https://github.com/actions/github-script/issues/545 --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 43c29f13..347c75ea 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ uses the GitHub API and the workflow run context. To use this action, provide an input named `script` that contains the body of an asynchronous JavaScript function call. The following arguments will be provided: -- `octokit` (and `github`) A pre-authenticated - [octokit/rest.js](https://octokit.github.io/rest.js) client _instance_ with pagination plugins +- `github` A pre-authenticated + [octokit/rest.js](https://octokit.github.io/rest.js) client with pagination plugins - `context` An object containing the [context of the workflow run](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts) - `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package @@ -102,14 +102,14 @@ By default, requests made with the `github` instance will not be retried. You ca result-encoding: string retries: 3 script: | - octokit.rest.issues.get({ + github.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, }) ``` -In this example, request failures from `octokit.rest.issues.get()` will be retried up to 3 times. +In this example, request failures from `github.rest.issues.get()` will be retried up to 3 times. You can also configure which status codes should be exempt from retries via the `retry-exempt-status-codes` option: @@ -121,7 +121,7 @@ You can also configure which status codes should be exempt from retries via the retries: 3 retry-exempt-status-codes: 400,401 script: | - octokit.rest.issues.get({ + github.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -162,7 +162,7 @@ jobs: - uses: actions/github-script@v7 with: script: | - octokit.rest.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -184,7 +184,7 @@ jobs: - uses: actions/github-script@v7 with: script: | - octokit.rest.issues.addLabels({ + github.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -209,12 +209,12 @@ jobs: // Get a list of all issues created by the PR opener // See: https://octokit.github.io/rest.js/#pagination const creator = context.payload.sender.login - const opts = octokit.rest.issues.listForRepo.endpoint.merge({ + const opts = github.rest.issues.listForRepo.endpoint.merge({ ...context.issue, creator, state: 'all' }) - const issues = await octokit.paginate(opts) + const issues = await github.paginate(opts) for (const issue of issues) { if (issue.number === context.issue.number) { @@ -226,7 +226,7 @@ jobs: } } - await octokit.rest.issues.createComment({ + await github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -252,7 +252,7 @@ jobs: with: script: | const diff_url = context.payload.pull_request.diff_url - const result = await octokit.request(diff_url) + const result = await github.request(diff_url) console.log(result) ``` @@ -289,7 +289,7 @@ jobs: name: context.repo.repo, label: 'wontfix' } - const result = await octokit.graphql(query, variables) + const result = await github.graphql(query, variables) console.log(result) ``` @@ -310,13 +310,13 @@ jobs: with: script: | const script = require('./path/to/script.js') - console.log(script({octokit, context})) + console.log(script({github, context})) ``` And then export a function from your module: ```javascript -module.exports = ({octokit, context}) => { +module.exports = ({github, context}) => { return context.payload.client_payload.value } ``` @@ -350,15 +350,15 @@ jobs: with: script: | const script = require('./path/to/script.js') - await script({octokit, context, core}) + await script({github, context, core}) ``` And then export an async function from your module: ```javascript -module.exports = async ({octokit, context, core}) => { +module.exports = async ({github, context, core}) => { const {SHA} = process.env - const commit = await octokit.rest.repos.getCommit({ + const commit = await github.rest.repos.getCommit({ owner: context.repo.owner, repo: context.repo.repo, ref: `${SHA}` @@ -487,7 +487,7 @@ jobs: with: github-token: ${{ secrets.MY_PAT }} script: | - octokit.rest.issues.addLabels({ + github.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, From 14b73c4a7e4ab8aee398450f2dcbd641a370b0a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:08:31 +0000 Subject: [PATCH 11/22] Bump ruby/setup-ruby from 1.213.0 to 1.222.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.213.0 to 1.222.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/28c4deda893d5a96a6b2d958c5b47fc18d65c9d3...277ba2a127aba66d45bad0fa2dc56f80dbfedffa) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/licensed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 15709f1c..64ea8724 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # prefer to use a full fetch for licensed workflows - - uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 # v1.213.0 + - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # v1.222.0 with: ruby-version: ruby - uses: github/setup-licensed@v1 From 5b5837ac81aaa9b6bb45b00fb65655354e6b154c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:45:58 +0000 Subject: [PATCH 12/22] Bump ruby/setup-ruby from 1.222.0 to 1.229.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.222.0 to 1.229.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/277ba2a127aba66d45bad0fa2dc56f80dbfedffa...354a1ad156761f5ee2b7b13fa8e09943a5e8d252) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/licensed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 64ea8724..e8eb6d0d 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # prefer to use a full fetch for licensed workflows - - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # v1.222.0 + - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0 with: ruby-version: ruby - uses: github/setup-licensed@v1 From f9d8109d52b3a4f751e2057c91342ca116253a53 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 13 May 2025 10:53:59 -0400 Subject: [PATCH 13/22] Clearly document passing inputs to the `script` --- README.md | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 98cf4486..5f8b8f59 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,31 @@ For example, `github.issues.createComment` in V4 becomes `github.rest.issues.cre See [development.md](/docs/development.md). +## Passing inputs to the script + +Actions expressions are evaluated before the `script` is passed to the action, so the result of any expressions +*will be evaluated as JavaScript code*. + +It's highly recommended to *not* evaluate expressions directly in the `script` to avoid +[script injections](https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections) +and potential `SyntaxError`s when the expression is not valid JavaScript code (particlarly when it comes to inproperly escaped strings). + +To pass inputs, set `env` vars on the action step and reference then them in your script with `process.env`: + +```yaml +- uses: actions/github-script@v7 + env: + TITLE: ${{ github.event.pull_request.title }} + with: + script: | + const title = process.env.TITLE; + if (title.startsWith('octocat')) { + console.log("PR title starts with 'octocat'"); + } else { + console.error("PR title did not start with 'octocat'"); + } +``` + ## Reading step results The return value of the script will be in the step's outputs under the @@ -444,27 +469,6 @@ export default async ({ core, context }) => { }; ``` -### Use env as input - -You can set env vars to use them in your script: - -```yaml -on: push - -jobs: - echo-input: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - env: - FIRST_NAME: Mona - LAST_NAME: Octocat - with: - script: | - const { FIRST_NAME, LAST_NAME } = process.env - - console.log(`Hello ${FIRST_NAME} ${LAST_NAME}`) -``` ### Using a separate GitHub token From 3424b52d08b4c47dbb213775f1ab9d14c7d3fb0e Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 13 May 2025 11:04:53 -0400 Subject: [PATCH 14/22] typo fixes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f8b8f59..466ed463 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ Actions expressions are evaluated before the `script` is passed to the action, s It's highly recommended to *not* evaluate expressions directly in the `script` to avoid [script injections](https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections) -and potential `SyntaxError`s when the expression is not valid JavaScript code (particlarly when it comes to inproperly escaped strings). +and potential `SyntaxError`s when the expression is not valid JavaScript code (particularly when it comes to improperly escaped strings). -To pass inputs, set `env` vars on the action step and reference then 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 - uses: actions/github-script@v7 From 1ae9958572fde544457e4d51aed5ea044e8936f3 Mon Sep 17 00:00:00 2001 From: Ben De St Paer-Gotch Date: Mon, 2 Jun 2025 10:34:00 +0100 Subject: [PATCH 15/22] Update README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 466ed463..6fe8ae7e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,26 @@ This action makes it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context. +### Note + +Thank you for your interest in this GitHub action, however, right now we are not taking contributions. + +We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in. + +We are taking the following steps to better direct requests related to GitHub Actions, including: + +1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions) + +2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report. + +3. Security Issues should be handled as per our [security.md](security.md) + +We will still provide security updates for this project and fix major breaking changes during this time. + +You are welcome to still raise bugs in this repo. + +### This action + To use this action, provide an input named `script` that contains the body of an asynchronous JavaScript function call. The following arguments will be provided: From 2c81ba05f308415d095291e6eeffe983d822345b Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti Date: Tue, 29 Jul 2025 14:08:35 +0100 Subject: [PATCH 16/22] 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. --- .../actions/install-dependencies/action.yml | 2 +- action.yml | 2 +- package-lock.json | 34 ++++++++++--------- package.json | 9 +++-- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 362c9325..82fbe0af 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -5,7 +5,7 @@ runs: steps: - uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '24.x' cache: npm - run: npm ci diff --git a/action.yml b/action.yml index 12a726af..66402087 100644 --- a/action.yml +++ b/action.yml @@ -36,5 +36,5 @@ outputs: result: description: The return value of the script, stringified with `JSON.stringify` runs: - using: node20 + using: node24 main: dist/index.js diff --git a/package-lock.json b/package-lock.json index a5c09ded..93edb739 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@octokit/core": "^5.0.1", "@octokit/plugin-request-log": "^4.0.0", "@octokit/plugin-retry": "^6.0.1", - "@types/node": "^20.9.0" + "@types/node": "^24.1.0" }, "devDependencies": { "@types/jest": "^29.5.5", @@ -35,7 +35,7 @@ "typescript": "^5.2.2" }, "engines": { - "node": ">=20.0.0 <21.0.0" + "node": ">=24" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1672,11 +1672,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", + "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.8.0" } }, "node_modules/@types/semver": { @@ -7113,9 +7114,10 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" }, "node_modules/universal-user-agent": { "version": "6.0.0", @@ -8652,11 +8654,11 @@ "dev": true }, "@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", + "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", "requires": { - "undici-types": "~5.26.4" + "undici-types": "~7.8.0" } }, "@types/semver": { @@ -12542,9 +12544,9 @@ } }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==" }, "universal-user-agent": { "version": "6.0.0", diff --git a/package.json b/package.json index 288efac5..287c392e 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,14 @@ { "name": "@actions/github-script", "description": "A GitHub action for executing a simple script", + "engines": { + "node": ">=24" + }, "version": "7.0.1", "author": "GitHub", "license": "MIT", "main": "dist/index.js", "types": "types/async-function.d.ts", - "private": true, - "engines": { - "node": ">=20.0.0 <21.0.0" - }, "scripts": { "build": "npm run build:types && ncc build src/main.ts", "build:types": "tsc src/async-function.ts -t es5 --declaration --allowJs --emitDeclarationOnly --outDir types", @@ -47,7 +46,7 @@ "@octokit/core": "^5.0.1", "@octokit/plugin-request-log": "^4.0.0", "@octokit/plugin-retry": "^6.0.1", - "@types/node": "^20.9.0" + "@types/node": "^24.1.0" }, "devDependencies": { "@types/jest": "^29.5.5", From e7b7f222b11a03e8b695c4c7afba89a02ea20164 Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti Date: Fri, 8 Aug 2025 12:15:47 +0100 Subject: [PATCH 17/22] update licenses --- .licenses/npm/@types/node.dep.yml | 2 +- .licenses/npm/undici-types.dep.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml index d5ab59f3..86544f48 100644 --- a/.licenses/npm/@types/node.dep.yml +++ b/.licenses/npm/@types/node.dep.yml @@ -1,6 +1,6 @@ --- name: "@types/node" -version: 20.9.0 +version: 24.1.0 type: npm summary: TypeScript definitions for node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node diff --git a/.licenses/npm/undici-types.dep.yml b/.licenses/npm/undici-types.dep.yml index a65b8aff..370219bf 100644 --- a/.licenses/npm/undici-types.dep.yml +++ b/.licenses/npm/undici-types.dep.yml @@ -1,15 +1,17 @@ --- name: undici-types -version: 5.26.5 +version: 7.8.0 type: npm summary: A stand-alone types package for Undici homepage: https://undici.nodejs.org license: mit licenses: -- sources: Auto-generated MIT license text +- sources: LICENSE text: | MIT License + Copyright (c) Matteo Collina and Undici contributors + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights From adc0eeac992408a7b276994ca87edde1c8ce4d25 Mon Sep 17 00:00:00 2001 From: Sneha Kripanandan <110618720+sneha-krip@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:27:46 -0400 Subject: [PATCH 18/22] README for updating actions/github-script from v7 to v8 --- README.md | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6fe8ae7e..fbff3d78 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ documentation. ## 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. + ### 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 @@ -91,7 +97,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`: ```yaml -- uses: actions/github-script@v7 +- uses: actions/github-script@v8 env: TITLE: ${{ github.event.pull_request.title }} with: @@ -110,7 +116,7 @@ The return value of the script will be in the step's outputs under the "result" key. ```yaml -- uses: actions/github-script@v7 +- uses: actions/github-script@v8 id: set-result with: script: return "Hello!" @@ -129,7 +135,7 @@ output of a github-script step. For some workflows, string encoding is preferred `result-encoding` input: ```yaml -- uses: actions/github-script@v7 +- uses: actions/github-script@v8 id: my-script with: result-encoding: string @@ -141,7 +147,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: ```yaml -- uses: actions/github-script@v7 +- uses: actions/github-script@v8 id: my-script with: result-encoding: string @@ -159,7 +165,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: ```yaml -- uses: actions/github-script@v7 +- uses: actions/github-script@v8 id: my-script with: result-encoding: string @@ -188,7 +194,7 @@ By default, github-script will use the token provided to your workflow. ```yaml - name: View context attributes - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: console.log(context) ``` @@ -204,7 +210,7 @@ jobs: comment: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | github.rest.issues.createComment({ @@ -226,7 +232,7 @@ jobs: apply-label: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | github.rest.issues.addLabels({ @@ -248,7 +254,7 @@ jobs: welcome: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | // Get a list of all issues created by the PR opener @@ -293,7 +299,7 @@ jobs: diff: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const diff_url = context.payload.pull_request.diff_url @@ -317,7 +323,7 @@ jobs: list-issues: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const query = `query($owner:String!, $name:String!, $label:String!) { @@ -351,7 +357,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const script = require('./path/to/script.js') @@ -389,7 +395,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 env: SHA: '${{env.parentSHA}}' with: @@ -433,7 +439,7 @@ jobs: - run: npm ci # or one-off: - run: npm install execa - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const execa = require('execa') @@ -463,7 +469,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const { default: printStuff } = await import('${{ github.workspace }}/src/print-stuff.js') @@ -507,7 +513,7 @@ jobs: apply-label: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: github-token: ${{ secrets.MY_PAT }} script: | @@ -531,7 +537,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const exitCode = await exec.exec('echo', ['hello']) @@ -549,7 +555,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const { From 8b222ac82eda86dcad7795c9d49b839f7bf5b18b Mon Sep 17 00:00:00 2001 From: Sneha Kripanandan <110618720+sneha-krip@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:39:58 -0400 Subject: [PATCH 19/22] Apply suggestion from @salmanmkc Co-authored-by: Salman Chishti --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index fbff3d78..1076da53 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ Version 8 of this action updated the runtime to Node 24 - https://docs.github.co All scripts are now run with Node 24 instead of Node 20 and are affected by any breaking changes between Node 20 and 24. +## What's new + +- Updated to the Node 24 runtime + - This requires a minimum Actions Runner version of [v2.327.1] ### 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 From 01e118c8d0d22115597e46514b5794e7bc3d56f1 Mon Sep 17 00:00:00 2001 From: Sneha Kripanandan <110618720+sneha-krip@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:42:40 -0400 Subject: [PATCH 20/22] Update README for Node 24 runtime requirements --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 1076da53..ad6cc532 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,8 @@ Version 8 of this action updated the runtime to Node 24 - https://docs.github.co All scripts are now run with Node 24 instead of Node 20 and are affected by any breaking changes between Node 20 and 24. -## What's new +This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) -- Updated to the Node 24 runtime - - This requires a minimum Actions Runner version of [v2.327.1] ### 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 From 2dc352e4baefd91bec0d06f6ae2f1045d1687ca3 Mon Sep 17 00:00:00 2001 From: Sneha Kripanandan <110618720+sneha-krip@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:43:07 -0400 Subject: [PATCH 21/22] Bold minimum Actions Runner version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad6cc532..3dfe48d4 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Version 8 of this action updated the runtime to Node 24 - https://docs.github.co 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) +**This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1)** ### V7 From e6664bd7038f8b201f86c1a5a4a52d30299e4d1c Mon Sep 17 00:00:00 2001 From: Granja cours Date: Mon, 10 Nov 2025 11:06:55 +0100 Subject: [PATCH 22/22] git script --- .vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..23fd35f0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file