From b51d57b6426345b418b9c354e775612c8b6d1e46 Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Wed, 1 May 2024 18:13:09 +0200 Subject: [PATCH] Fix fetch failure when iterating over PRs --- .github/workflows/nightly_pr_comment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly_pr_comment.yml b/.github/workflows/nightly_pr_comment.yml index 6914cb063..d92dee5c8 100644 --- a/.github/workflows/nightly_pr_comment.yml +++ b/.github/workflows/nightly_pr_comment.yml @@ -19,7 +19,7 @@ jobs: const pull_head_sha = '${{github.event.workflow_run.head_sha}}'; const issue_number = await (async () => { - const pulls = await github.rest.pulls.list({owner, repo}); + const pulls = await github.rest.pulls.list.endpoint.merge({owner, repo}); for await (const {data} of github.paginate.iterator(pulls)) { for (const pull of data) { if (pull.head.sha === pull_head_sha) { @@ -68,4 +68,4 @@ jobs: } else { core.info(`Creating a comment`); await github.rest.issues.createComment({repo, owner, issue_number, body}); - } \ No newline at end of file + }