From 9baf49497e860b89dae6117c684bc8297072891c Mon Sep 17 00:00:00 2001 From: George Joseph Date: Mon, 5 Feb 2024 08:31:47 -0700 Subject: [PATCH] .github: Update github-script to v7 and fix a rest bug Need to update the github-script to v7 to squash deprecation warnings. Also fixed the API name for github.rest.pulls.requestReviewers. --- .github/workflows/PRSubmitActions.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/PRSubmitActions.yml b/.github/workflows/PRSubmitActions.yml index 967dc4f83d..2ea87c7601 100644 --- a/.github/workflows/PRSubmitActions.yml +++ b/.github/workflows/PRSubmitActions.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Get PR Number id: getpr - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: retries: 5 script: | @@ -35,7 +35,7 @@ jobs: - name: Set Label id: setlabel - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: PR_NUMBER: ${{ steps.getpr.outputs.PR_NUMBER }} LABEL_TIP: ${{ vars.PR_SUBMIT_TESTING_IN_PROGRESS }} @@ -75,7 +75,7 @@ jobs: - name: Add cherry-pick reminder if: github.event.action == 'completed' - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: PR_NUMBER: ${{steps.getpr.outputs.PR_NUMBER}} CHERRY_PICK_REMINDER: ${{vars.CHERRY_PICK_REMINDER}} @@ -117,7 +117,7 @@ jobs: - name: Add reviewers if: github.event.action == 'completed' - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: PR_NUMBER: ${{steps.getpr.outputs.PR_NUMBER}} REVIEWERS: ${{vars.PR_REVIEWERS}} @@ -137,7 +137,7 @@ jobs: if (teams.length > 0 || users.length > 0) { core.info(`Adding user reviewers ${users}`); core.info(`Adding team reviewers ${teams}`); - await github.pulls.requestReviewers({ + await github.rest.pulls.requestReviewers({ pull_number: process.env.PR_NUMBER, owner: context.repo.owner, repo: context.repo.repo,