Skip to content

Commit

Permalink
Use pagination to list jobs in check-required workflow (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi authored Jun 10, 2024
1 parent 79ca0f1 commit f82fd61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-required.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
with:
script: |
// list jobs for worklow run attempt
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRunAttempt({
const { data: { jobs } } = await github.paginate(github.rest.actions.listJobsForWorkflowRunAttempt({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
run_id: context.payload.workflow_run.id,
attempt_number: context.payload.workflow_run.run_attempt,
});
}));
// check if required job was successful
var success = false;
core.info(`Checking jobs for workflow run ${context.payload.workflow_run.html_url}`);
Expand Down

0 comments on commit f82fd61

Please sign in to comment.