.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.
This commit is contained in:
George Joseph 2024-02-05 08:31:47 -07:00
parent ea3b520bed
commit de806580f3
1 changed files with 5 additions and 5 deletions

View File

@ -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,