From 8524d2c082412eb43ccca2778dadc5b391f86d61 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 13 Jul 2023 13:35:55 +0300 Subject: [PATCH] add break condition --- dist/index.js | 3 +++ src/index.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/dist/index.js b/dist/index.js index 3460627..78a1fb4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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) { diff --git a/src/index.ts b/src/index.ts index 31dcae7..f5ef700 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,11 @@ async function run() { per_page: 100, page: i }); + + if (cachesRequest.actions_caches.length == 0) { + break + } + results.push(...cachesRequest.actions_caches) }