Skip to content

Commit b0202f7

Browse files
authored
Update actions/github-script to v5 (#7151)
1 parent be5a109 commit b0202f7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/mypy_primer_comment.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Download diffs
20-
uses: actions/github-script@v3
20+
uses: actions/github-script@v5
2121
with:
2222
script: |
2323
const fs = require('fs');
24-
const artifacts = await github.actions.listWorkflowRunArtifacts({
24+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
2525
owner: context.repo.owner,
2626
repo: context.repo.repo,
2727
run_id: ${{ github.event.workflow_run.id }},
2828
});
2929
const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>
3030
artifact.name == "mypy_primer_diffs");
3131
32-
const download = await github.actions.downloadArtifact({
32+
const download = await github.rest.actions.downloadArtifact({
3333
owner: context.repo.owner,
3434
repo: context.repo.repo,
3535
artifact_id: matchArtifact.id,
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Post comment
4646
id: post-comment
47-
uses: actions/github-script@v3
47+
uses: actions/github-script@v5
4848
with:
4949
github-token: ${{secrets.GITHUB_TOKEN}}
5050
script: |
@@ -59,7 +59,7 @@ jobs:
5959
}
6060
6161
const prNumber = parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
62-
await github.issues.createComment({
62+
await github.rest.issues.createComment({
6363
issue_number: prNumber,
6464
owner: context.repo.owner,
6565
repo: context.repo.repo,

.github/workflows/stubtest.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ jobs:
6868
permissions:
6969
issues: write
7070
steps:
71-
- uses: actions/github-script@v3
71+
- uses: actions/github-script@v5
7272
with:
73-
github-token: ${{secrets.GITHUB_TOKEN}}
73+
github-token: ${{ secrets.GITHUB_TOKEN }}
7474
script: |
75-
await github.issues.create({
75+
await github.rest.issues.create({
7676
owner: "python",
7777
repo: "typeshed",
7878
title: `Stubtest failed on ${new Date().toDateString()}`,

0 commit comments

Comments
 (0)