diff options
author | Mary-nyan <mary@mary.zone> | 2022-10-23 17:15:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 17:15:15 +0200 |
commit | 9b06ee7736993494c9b7f730f22283edf8e550b7 (patch) | |
tree | c4e117792957be58cc65024f16add0e40de96e9d | |
parent | baba2c2467e59c52d391b0caec7dec4186d64d99 (diff) |
Attempt to fix issues since github-script v6 upgrade1.1.325
-rw-r--r-- | .github/workflows/nightly_pr_comment.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/nightly_pr_comment.yml b/.github/workflows/nightly_pr_comment.yml index f6d52de1..bc3d1c43 100644 --- a/.github/workflows/nightly_pr_comment.yml +++ b/.github/workflows/nightly_pr_comment.yml @@ -16,7 +16,7 @@ jobs: const pull_head_sha = '${{github.event.workflow_run.head_sha}}'; const issue_number = await (async () => { - const pulls = await github.pulls.list({owner, repo}); + const pulls = await github.rest.pulls.list({owner, repo}); for await (const {data} of github.paginate.iterator(pulls)) { for (const pull of data) { if (pull.head.sha === pull_head_sha) { @@ -31,7 +31,7 @@ jobs: return core.error(`No matching pull request found`); } - const {data: {artifacts}} = await github.actions.listWorkflowRunArtifacts({owner, repo, run_id}); + const {data: {artifacts}} = await github.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id}); if (!artifacts.length) { return core.error(`No artifacts found`); } @@ -57,12 +57,12 @@ jobs: body += hidden_headless_artifacts; body += hidden_debug_artifacts; - const {data: comments} = await github.issues.listComments({repo, owner, issue_number}); + const {data: comments} = await github.rest.issues.listComments({repo, owner, issue_number}); const existing_comment = comments.find((c) => c.user.login === 'github-actions[bot]'); if (existing_comment) { core.info(`Updating comment ${existing_comment.id}`); - await github.issues.updateComment({repo, owner, comment_id: existing_comment.id, body}); + await github.rest.issues.updateComment({repo, owner, comment_id: existing_comment.id, body}); } else { core.info(`Creating a comment`); - await github.issues.createComment({repo, owner, issue_number, body}); + await github.rest.issues.createComment({repo, owner, issue_number, body}); } |