Skip to content

Commit 7df3519

Browse files
committed
use paginated client
1 parent 4688af0 commit 7df3519

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/build-common.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,22 @@ jobs:
328328
with:
329329
result-encoding: string
330330
script: |
331-
const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
332-
owner: context.repo.owner,
333-
repo: context.repo.repo,
334-
run_id: context.runId,
335-
per_page: 200
336-
});
337331
const matrix = JSON.parse(process.env.matrix);
338332
const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm }, indy ${ matrix['test-indy'] })`;
339-
return workflow_run.jobs.find((job) => job.name === job_name).html_url;
333+
334+
const workflow_jobs_nested = await github.paginate(
335+
github.rest.actions.listJobsForWorkflowRun,
336+
{
337+
owner: context.repo.owner,
338+
repo: context.repo.repo,
339+
run_id: context.runId,
340+
per_page: 100
341+
},
342+
(response) => {
343+
return response.data.workflow_run.jobs;
344+
},
345+
);
346+
return workflow_jobs_nested.flat().find((job) => job.name === job_name).html_url;
340347
341348
- name: Flaky test report
342349
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)