1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-19 07:26:50 +00:00

Treat zero checks as pending, not passing

When a push event triggers reconciliation, the GitHub workflow may not
have started yet, resulting in 0 checks. Previously this was treated
as 'all checks passing'. Now we treat it as pending and wait for checks
to start.
This commit is contained in:
Jason Hall 2026-02-04 12:16:26 -05:00
parent 6100adadeb
commit 0255000457

View file

@ -536,6 +536,15 @@ func (r *PRReconciler) runCIFixer(ctx context.Context, gh *github.Client, owner,
log.Infof("CI status: pending=%d passed=%d failed=%d", pending, passed, failed)
// If no checks exist yet, treat as pending - workflows may not have started
if pending == 0 && passed == 0 && failed == 0 {
log.Infof("No CI checks found yet, treating as pending")
details.CIFixPending = true
details.CIFixReasoning = "Waiting for CI checks to start"
details.CIFixTurns = previousTurn
return nil
}
// If checks are still pending, skip this reconciliation.
// We'll be triggered again when they complete.
if pending > 0 {