mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Update actions/github-script to v5 (#7151)
This commit is contained in:
10
.github/workflows/mypy_primer_comment.yml
vendored
10
.github/workflows/mypy_primer_comment.yml
vendored
@@ -17,11 +17,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download diffs
|
||||
uses: actions/github-script@v3
|
||||
uses: actions/github-script@v5
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{ github.event.workflow_run.id }},
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>
|
||||
artifact.name == "mypy_primer_diffs");
|
||||
|
||||
const download = await github.actions.downloadArtifact({
|
||||
const download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
|
||||
- name: Post comment
|
||||
id: post-comment
|
||||
uses: actions/github-script@v3
|
||||
uses: actions/github-script@v5
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
}
|
||||
|
||||
const prNumber = parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))
|
||||
await github.issues.createComment({
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: prNumber,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
||||
6
.github/workflows/stubtest.yml
vendored
6
.github/workflows/stubtest.yml
vendored
@@ -68,11 +68,11 @@ jobs:
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/github-script@v3
|
||||
- uses: actions/github-script@v5
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
await github.issues.create({
|
||||
await github.rest.issues.create({
|
||||
owner: "python",
|
||||
repo: "typeshed",
|
||||
title: `Stubtest failed on ${new Date().toDateString()}`,
|
||||
|
||||
Reference in New Issue
Block a user