From 05be392a04c6f745a577e62defb5020407710258 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 12:45:46 +0000 Subject: [PATCH 1/2] Initial plan From 7abec94d42b1cfb570e6367b7bc8f1b61a764e77 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 12:57:00 +0000 Subject: [PATCH 2/2] Fix Get-PrBuildIds.ps1 to correctly aggregate build states across all jobs Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- .../scripts/Get-PrBuildIds.ps1 | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/skills/pr-build-status/scripts/Get-PrBuildIds.ps1 b/.github/skills/pr-build-status/scripts/Get-PrBuildIds.ps1 index fa34f253b15..bb3a5146eb4 100644 --- a/.github/skills/pr-build-status/scripts/Get-PrBuildIds.ps1 +++ b/.github/skills/pr-build-status/scripts/Get-PrBuildIds.ps1 @@ -19,7 +19,12 @@ ./Get-PrBuildIds.ps1 -PrNumber 33251 -Repo "dotnet/fsharp" .OUTPUTS - Array of objects with Pipeline, BuildId, State, and Link properties. + Array of objects with Pipeline, BuildId, State, Detail, and Link properties. + The State represents the worst-case state across all jobs in the build: + - FAILURE if any job failed + - IN_PROGRESS if any job is still running or queued + - SUCCESS if all jobs completed successfully + The Detail field shows the count of jobs in each state. #> [CmdletBinding()] @@ -60,6 +65,30 @@ $builds = $checks | Where-Object { $_.link -match "dev\.azure\.com" } | ForEach- State = $_.state Link = $_.link } -} | Sort-Object -Property Pipeline, BuildId -Unique +} | Group-Object BuildId | ForEach-Object { + $jobs = $_.Group + $states = $jobs | Select-Object -ExpandProperty State -Unique + + # Determine overall state (worst case wins) + $overall = if ($states -contains "FAILURE") { + "FAILURE" + } + elseif ($states -contains "IN_PROGRESS" -or $states -contains "QUEUED") { + "IN_PROGRESS" + } + else { + "SUCCESS" + } + + $first = $jobs | Select-Object -First 1 + + [PSCustomObject]@{ + Pipeline = $first.Pipeline + BuildId = $first.BuildId + State = $overall + Detail = ($jobs | Group-Object State | ForEach-Object { "$($_.Count) $($_.Name)" }) -join ", " + Link = ($first.Link -replace "\&view=.*", "") + } +} $builds \ No newline at end of file