Skip to content

Commit d3a086a

Browse files
authored
Revert client–side GitHub Actions job filtering (#980)
* Revert client–side GitHub Actions job filtering * Format code
1 parent dc27724 commit d3a086a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/drivers/github.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -630,19 +630,17 @@ class Github {
630630

631631
const workflowRuns = await octokitClient.paginate(
632632
octokitClient.actions.listWorkflowRunsForRepo,
633-
{ owner, repo }
633+
{ owner, repo, status }
634634
);
635635

636636
let runJobs = await Promise.all(
637-
workflowRuns
638-
.filter(({ status: jobStatus }) => jobStatus === status)
639-
.map(
640-
async ({ id }) =>
641-
await octokitClient.paginate(
642-
octokitClient.actions.listJobsForWorkflowRun,
643-
{ owner, repo, run_id: id, status }
644-
)
645-
)
637+
workflowRuns.map(
638+
async ({ id }) =>
639+
await octokitClient.paginate(
640+
octokitClient.actions.listJobsForWorkflowRun,
641+
{ owner, repo, run_id: id, status }
642+
)
643+
)
646644
);
647645

648646
runJobs = [].concat.apply([], runJobs).map((job) => {

0 commit comments

Comments
 (0)