{"thread":{"id":"58762","subject":"[PATCH] ci: use a newer `github-script` version","startedAt":"2022-11-08T10:13:35Z","lastAt":"2022-11-08T20:37:13Z","messageCount":2,"participants":["Johannes Schindelin via GitGitGadget","Taylor Blau"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"466810","messageId":"pull.1387.git.1667902408921.gitgitgadget@gmail.com","threadId":"58762","inReplyTo":null,"subject":"[PATCH] ci: use a newer `github-script` version","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-11-08T10:13:28Z","receivedAt":"2022-11-08T10:13:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe old version we currently use runs in node.js v12.x, which is being\ndeprecated in GitHub Actions. The new version uses node.js v16.x.\n\nIncidentally, this also avoids the warning about the deprecated\n`::set-output::` workflow command because the newer version of the\n`github-script` Action uses the recommended new way to specify outputs.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    ci: use a newer github-script version\n    \n    I had a look at the CI run of seen a couple of weeks ago and saw not\n    only quite a number of failures but also quite a number of warnings.\n    \n    This patch addresses a few of them, including the ones about using the\n    deprecated ::set-output:: workflow command\n    [https://github.com/gitgitgadget/git/actions/runs/3412982102/jobs/5679166059#step:4:46].\n    \n    Similar warnings will be addressed by\n    od/ci-use-checkout-v3-when-applicable.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1387%2Fdscho%2Fupgrade-github-script-version-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1387/dscho/upgrade-github-script-version-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1387\n\n .github/workflows/main.yml | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 831f4df56c5..cdfb777a699 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -37,14 +37,14 @@ jobs:\n           echo \"::set-output name=enabled::$enabled\"\n       - name: skip if the commit or tree was already tested\n         id: skip-if-redundant\n-        uses: actions/github-script@v3\n+        uses: actions/github-script@v6\n         if: steps.check-ref.outputs.enabled == 'yes'\n         with:\n           github-token: ${{secrets.GITHUB_TOKEN}}\n           script: |\n             try {\n               // Figure out workflow ID, commit and tree\n-              const { data: run } = await github.actions.getWorkflowRun({\n+              const { data: run } = await github.rest.actions.getWorkflowRun({\n                 owner: context.repo.owner,\n                 repo: context.repo.repo,\n                 run_id: context.runId,\n@@ -54,7 +54,7 @@ jobs:\n               const tree_id = run.head_commit.tree_id;\n \n               // See whether there is a successful run for that commit or tree\n-              const { data: runs } = await github.actions.listWorkflowRuns({\n+              const { data: runs } = await github.rest.actions.listWorkflowRuns({\n                 owner: context.repo.owner,\n                 repo: context.repo.repo,\n                 per_page: 500,\n\nbase-commit: 4732897cf0a255a23dca9e97b65cea40cd06c5a8\n-- \ngitgitgadget\n"},{"id":"466894","messageId":"Y2q9723uEtfkJrah@nand.local","threadId":"58762","inReplyTo":"pull.1387.git.1667902408921.gitgitgadget@gmail.com","subject":"Re: [PATCH] ci: use a newer `github-script` version","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2022-11-08T20:37:03Z","receivedAt":"2022-11-08T20:37:13Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Nov 08, 2022 at 10:13:28AM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> The old version we currently use runs in node.js v12.x, which is being\n> deprecated in GitHub Actions. The new version uses node.js v16.x.\n>\n> Incidentally, this also avoids the warning about the deprecated\n> `::set-output::` workflow command because the newer version of the\n> `github-script` Action uses the recommended new way to specify outputs.\n\nThanks for working on this.\n\nI also appreciate you taking a more minimal approach by avoiding\ntouching the explicit \"echo ::set-output::\"'s throughout the workflow\ndefinition, since there is other work going on there.\n\nSo let's merge this one down, let the dust settle on the other topic,\nand then come back and remove the remaining ::set-output::'s later on.\n\n\nThanks,\nTaylor\n"}]}