Skip to content

Commit 594d20c

Browse files
geraldbarre-workleapGérald Barré
andauthored
Update error message to use job inputs instead of env variable names (#162)
Co-authored-by: Gérald Barré <gerald.barre@gsoft.com>
1 parent 67330aa commit 594d20c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/required_checks_policy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
149149
if ($requiredChecks.Count -eq 0) {
150150
if ($env:CI_FAIL_IF_NO_POLICY -eq 'true') {
151-
Write-Error "❌ No required checks found for the changed paths, but CI_FAIL_IF_NO_POLICY is set."
151+
Write-Error "❌ No required checks found for the changed paths, but 'failIfNoPolicy' is set to true."
152152
exit 1
153153
}
154154
@@ -236,7 +236,7 @@ jobs:
236236
elseif ($check.status -eq "queued") {
237237
$completed = $false
238238
if ((Get-Date -AsUTC) - $startedAt -gt $TimeoutQueued) {
239-
Write-Error "❌ Check '$requiredCheck' is still queued after $($TimeoutQueued.TotalMinutes) minutes. Details: $($check.html_url)"
239+
Write-Error "❌ Check '$requiredCheck' is still queued after $($TimeoutQueued.TotalMinutes) minutes (timeout-minutes-queued-checks: $($env:CI_TIMEOUT_MINUTES_QUEUED_CHECKS)). Details: $($check.html_url)"
240240
exit 1
241241
}
242242
}
@@ -250,7 +250,7 @@ jobs:
250250
$completed = $false
251251
if ((Get-Date -AsUTC) - $startedAt -gt $TimeoutCreated) {
252252
$checkNames = $checkRuns.check_runs | ForEach-Object { "- $($_.name)" } | Sort-Object -Unique
253-
Write-Error "❌ Check '$requiredCheck' wasn't created after $($TimeoutCreated.TotalMinutes) minutes. Available checks:`n$($checkNames -join "`n")"
253+
Write-Error "❌ Check '$requiredCheck' wasn't created after $($TimeoutCreated.TotalMinutes) minutes (timeout-minutes-created-checks: $($env:CI_TIMEOUT_MINUTES_CREATED_CHECKS)). Available checks:`n$($checkNames -join "`n")"
254254
exit 1
255255
}
256256
}

0 commit comments

Comments
 (0)