From be142b00bdca6f2cda069c7ddf315f0c96de84af Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 24 Mar 2026 23:54:27 -0400 Subject: [PATCH] Process issues sequentially to avoid rate limits --- script/github/close-issues.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/script/github/close-issues.ts b/script/github/close-issues.ts index d373b4ca15..f5470e2524 100755 --- a/script/github/close-issues.ts +++ b/script/github/close-issues.ts @@ -58,6 +58,7 @@ async function main() { const all = (await res.json()) as Issue[] if (all.length === 0) break + console.log(`Fetched page ${page} ${all.length} issues`) const stale: number[] = [] for (const i of all) { @@ -67,8 +68,10 @@ async function main() { } else { console.log(`\nFound fresh issue #${i.number}, stopping`) if (stale.length > 0) { - await Promise.all(stale.map(close)) - closed += stale.length + for (const num of stale) { + await close(num) + closed++ + } } console.log(`Closed ${closed} issues total`) return @@ -76,8 +79,10 @@ async function main() { } if (stale.length > 0) { - await Promise.all(stale.map(close)) - closed += stale.length + for (const num of stale) { + await close(num) + closed++ + } } page++