File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,30 +63,20 @@ jobs:
6363 break
6464 }
6565
66- $failedChecks = $checksJson | Where-Object {
67- $_.conclusion -notin @("success", "skipped", "neutral") -and $_.status -eq "completed"
66+ $allChecksPassed = $true
67+ foreach ($check in $checksJson) {
68+ Write-Host " - $($check.name): $($check.state)"
69+ if ($check.state -ne "SUCCESS") {
70+ $allChecksPassed = $false
71+ break;
72+ }
6873 }
6974
70- $pendingChecks = $checksJson | Where-Object {
71- $_.status -ne "completed"
75+ if (-not $allChecksPassed) {
76+ Write-Host " Skipping: Not all checks passed"
77+ continue
7278 }
73-
74- if ($failedChecks.Count -gt 0) {
75- Write-Host " Failed checks found:"
76- foreach ($check in $failedChecks) {
77- Write-Host " - $($check.name): $($check.conclusion)"
78- }
79- continue
80- }
81-
82- if ($pendingChecks.Count -gt 0) {
83- Write-Host " Pending checks found:"
84- foreach ($check in $pendingChecks) {
85- Write-Host " - $($check.name): $($check.status)"
86- }
87- continue
88- }
89-
79+
9080 Write-Host " All checks passed!"
9181 $completablePr = $pr
9282 break
You can’t perform that action at this time.
0 commit comments