Fix pr-artifacts fetch script after version update (#786)

This commit is contained in:
Archez 2024-10-01 15:32:03 -04:00 committed by GitHub
parent 200aaf7be8
commit 75bc685360
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,8 +20,9 @@ jobs:
const pullHeadSHA = '${{github.event.workflow_run.head_sha}}';
const pullUserId = ${{github.event.sender.id}};
const prNumber = await (async () => {
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls)) {
for await (const { data } of github.paginate.iterator(
github.rest.pulls.list, { owner, repo }
)) {
for (const pull of data) {
if (pull.head.sha === pullHeadSHA && pull.user.id === pullUserId) {
return pull.number;