Skip to content

Commit

Permalink
handle broken bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-peterson committed Sep 13, 2024
1 parent 78a1507 commit 0b0b4a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/GitlabCli/Pipelines.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ function Get-GitlabPipeline {

foreach ($Downstream in $DownstreamList) {
$MatchingBridge = $Bridges | Where-Object { $_.DownstreamPipeline.id -eq $Downstream.Id }
$DownstreamMap[$MatchingBridge.Name] = $Downstream
if ($MatchingBridge) {
$DownstreamMap[$MatchingBridge.Name] = $Downstream
}
else {
Write-Debug -Message "No bridge found for $($Downstream.Id)"
}
}
$Pipeline | Add-Member -MemberType 'NoteProperty' -Name 'Downstream' -Value $DownstreamMap
}
Expand Down

0 comments on commit 0b0b4a8

Please sign in to comment.