From 5277cf03c1ff8348044fd231423c6b2358cc7402 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 19 Nov 2024 19:49:05 +0000 Subject: [PATCH 1/3] Bump to `actions/github-script@v7` --- .github/actions/binder-link/action.yml | 2 +- .github/actions/enforce-label/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/binder-link/action.yml b/.github/actions/binder-link/action.yml index 89f741e..e650fbd 100644 --- a/.github/actions/binder-link/action.yml +++ b/.github/actions/binder-link/action.yml @@ -11,7 +11,7 @@ runs: using: "composite" steps: - name: add binder link - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{ inputs.github_token }} script: | diff --git a/.github/actions/enforce-label/action.yml b/.github/actions/enforce-label/action.yml index 1050154..5353741 100644 --- a/.github/actions/enforce-label/action.yml +++ b/.github/actions/enforce-label/action.yml @@ -8,7 +8,7 @@ runs: if: ${{ github.event.action == 'opened' }} run: sleep 60 - name: enforce-triage-label - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: script: | const required = ['bug', 'enhancement', 'feature', 'maintenance', 'documentation']; From 8a073884ce258fcd4ebc69eb13a1393fe109c37b Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 19 Nov 2024 19:59:03 +0000 Subject: [PATCH 2/3] fix for v5 --- .github/actions/binder-link/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/binder-link/action.yml b/.github/actions/binder-link/action.yml index e650fbd..df4c70f 100644 --- a/.github/actions/binder-link/action.yml +++ b/.github/actions/binder-link/action.yml @@ -26,7 +26,7 @@ runs: body: BODY }; if ("${{ inputs.github_token }}" !== "FAKE") { - github.issues.createComment(CONTENT); + github.rest.issues.createComment(CONTENT); } env: PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} From a11c6a44adab7ae5de2219749595446eb8e0e947 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 19 Nov 2024 19:59:58 +0000 Subject: [PATCH 3/3] more fixes --- .github/actions/enforce-label/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/enforce-label/action.yml b/.github/actions/enforce-label/action.yml index 5353741..54371b9 100644 --- a/.github/actions/enforce-label/action.yml +++ b/.github/actions/enforce-label/action.yml @@ -14,7 +14,7 @@ runs: const required = ['bug', 'enhancement', 'feature', 'maintenance', 'documentation']; const botUsers =['pre-commit-ci[bot]', 'dependabot[bot]']; // https://docs.github.com/en/rest/reference/issues#get-an-issue - const response = await github.issues.get({ + const response = await github.rest.issues.get({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, @@ -31,7 +31,7 @@ runs: try { if (botUsers.indexOf(response.data.user.login) !== -1) { // https://docs.github.com/en/rest/reference/issues#add-labels-to-an-issue - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,