File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff 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 ++
You can’t perform that action at this time.
0 commit comments