Skip to content

Commit

Permalink
add break condition
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jul 13, 2023
1 parent 2329f8d commit 8524d2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,9 @@ function run() {
per_page: 100,
page: i
});
if (cachesRequest.actions_caches.length == 0) {
break;
}
results.push(...cachesRequest.actions_caches);
}
if (debug) {
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ async function run() {
per_page: 100,
page: i
});

if (cachesRequest.actions_caches.length == 0) {
break
}

results.push(...cachesRequest.actions_caches)
}

Expand Down

0 comments on commit 8524d2c

Please sign in to comment.