GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Process issues sequentially to avoid rate limits · anotheroni/opencode@be142b0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • script/github
    • close-issues.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎script/github/close-issues.ts‎

Copy file name to clipboardExpand all lines: script/github/close-issues.ts
+9-4Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ async function main() {
5858

5959
const all = (await res.json()) as Issue[]
6060
if (all.length === 0) break
61+
console.log(`Fetched page ${page} ${all.length} issues`)
6162

6263
const stale: number[] = []
6364
for (const i of all) {
@@ -67,17 +68,21 @@ async function main() {
6768
} else {
6869
console.log(`\nFound fresh issue #${i.number}, stopping`)
6970
if (stale.length > 0) {
70-
await Promise.all(stale.map(close))
71-
closed += stale.length
71+
for (const num of stale) {
72+
await close(num)
73+
closed++
74+
}
7275
}
7376
console.log(`Closed ${closed} issues total`)
7477
return
7578
}
7679
}
7780

7881
if (stale.length > 0) {
79-
await Promise.all(stale.map(close))
80-
closed += stale.length
82+
for (const num of stale) {
83+
await close(num)
84+
closed++
85+
}
8186
}
8287

8388
page++

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.