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:
parent
6100adadeb
commit
0255000457
1 changed files with 9 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue