summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-03-24 23:54:27 -0400
committerDax Raad <[email protected]>2026-03-24 23:54:27 -0400
commitbe142b00bdca6f2cda069c7ddf315f0c96de84af (patch)
tree9ea41f19790b443a453bd55995d6eba9e9f50e97
parent45c25739793f9154855e492106be2c7420c20f28 (diff)
downloadopencode-be142b00bdca6f2cda069c7ddf315f0c96de84af.tar.gz
opencode-be142b00bdca6f2cda069c7ddf315f0c96de84af.zip
Process issues sequentially to avoid rate limits
-rwxr-xr-xscript/github/close-issues.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/script/github/close-issues.ts b/script/github/close-issues.ts
index d373b4ca1..f5470e252 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++