Skip to content

Commit 27369b8

Browse files
KyleJukyleju
andauthored
Upgrade github-script (#6920)
* Upgrade github-script * use github.rest in v5 * Upgrade upload artifact again --------- Co-authored-by: kyleju <[email protected]>
1 parent 95619aa commit 27369b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/auto-approve.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
# As of 2023-05-18, https://github.com/actions/download-artifact cannot download artifacts across workflows.
2929
# As a result, have to use the script GitHub provides to download the artifact.
3030
- name: 'Download PR number'
31-
uses: actions/github-script@v3.1.0
31+
uses: actions/github-script@v7
3232
with:
3333
script: |
3434
console.log("Starting to list artifacts");
35-
var artifacts = await github.actions.listWorkflowRunArtifacts({
35+
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
3636
owner: context.repo.owner,
3737
repo: context.repo.repo,
3838
run_id: context.payload.workflow_run.id,
@@ -42,7 +42,7 @@ jobs:
4242
return artifact.name == "pr_number"
4343
})[0];
4444
console.log("Downloading artifacts");
45-
var download = await github.actions.downloadArtifact({
45+
var download = await github.rest.actions.downloadArtifact({
4646
owner: context.repo.owner,
4747
repo: context.repo.repo,
4848
artifact_id: matchArtifact.id,

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
mkdir -p ./pr
3131
echo $PR_NUMBER > ./pr/pr_number.txt
32-
- uses: actions/upload-artifact@v3
32+
- uses: actions/upload-artifact@v4
3333
with:
3434
name: pr_number
3535
path: pr/

0 commit comments

Comments
 (0)