Skip to content

Commit

Permalink
.github: Update github-script to v7 and fix a rest bug
Browse files Browse the repository at this point in the history
Need to update the github-script to v7 to squash deprecation
warnings.

Also fixed the API name for github.rest.pulls.requestReviewers.
  • Loading branch information
gtjoseph committed Feb 5, 2024
1 parent d04afeb commit bf8eb87
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/PRSubmitActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
Expand Down Expand Up @@ -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}}
Expand Down Expand Up @@ -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}}
Expand All @@ -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({
pr_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit bf8eb87

Please sign in to comment.