(items, batchSize, func)
| 140 | } |
| 141 | |
| 142 | async function batchRequests(items, batchSize, func) { |
| 143 | while (items.length > 0) { |
| 144 | const batch = items.splice(0, batchSize); |
| 145 | await Promise.all(batch.map(func)); |
| 146 | await new Promise(resolve => setTimeout(resolve, 2500)); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | async function resetOriginRepo({ owner, repo, tempDir }) { |
| 151 | console.log('Resetting origin repo:', `${owner}/${repo}`); |
no test coverage detected