Fix fetch failure when iterating over PRs

This commit is contained in:
TSR Berry 2024-05-01 18:13:09 +02:00
parent 54c16f4052
commit b51d57b642
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2

View file

@ -19,7 +19,7 @@ jobs:
const pull_head_sha = '${{github.event.workflow_run.head_sha}}'; const pull_head_sha = '${{github.event.workflow_run.head_sha}}';
const issue_number = await (async () => { 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 await (const {data} of github.paginate.iterator(pulls)) {
for (const pull of data) { for (const pull of data) {
if (pull.head.sha === pull_head_sha) { if (pull.head.sha === pull_head_sha) {