Skip to content

Commit

Permalink
feature: fetch 100 results per page (#39)
Browse files Browse the repository at this point in the history
* Fetch 100 results per page

If a repo has used more than 30 workflow names (even in PRs that were
never merged), this will save API calls.

* fix

Signed-off-by: Rui Chen <rui@chenrui.dev>

---------

Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
anomiex and chenrui333 authored Jun 19, 2024
1 parent f635b38 commit 9dccc7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class OctokitGitHub {
this.octokit.paginate(this.octokit.actions.listRepoWorkflows, {
owner,
repo,
per_page: 100,
});

runs = async (
Expand All @@ -46,6 +47,7 @@ export class OctokitGitHub {
repo,
workflow_id,
status: "in_progress",
per_page: 100,
};

if (branch) {
Expand Down

0 comments on commit 9dccc7a

Please sign in to comment.