Skip to content

Commit 82c282c

Browse files
committed
Skip job checking when workflow is queued
Wait for workflow to start running before checking for failed jobs. Prevents infinite loop when workflow is in queued/waiting state.
1 parent 3ddb5ca commit 82c282c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/claude.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3191,6 +3191,13 @@ Let's work through this together to get CI passing.`
31913191

31923192
log.substep(`Workflow "${run.name}" status: ${run.status}`)
31933193

3194+
// If workflow is queued, just wait for it to start
3195+
if (run.status === 'queued' || run.status === 'waiting') {
3196+
log.substep('Waiting for workflow to start...')
3197+
await new Promise(resolve => setTimeout(resolve, 30_000))
3198+
continue
3199+
}
3200+
31943201
if (run.status === 'completed') {
31953202
if (run.conclusion === 'success') {
31963203
log.done('CI workflow passed! 🎉')

0 commit comments

Comments
 (0)