|
269 | 269 | $definitionID = $psBoundParameters['DefinitionID'] = $in.DefinitionID |
270 | 270 | } |
271 | 271 | } |
| 272 | + if (($ParameterSet -like '*{BuildId}*') -and |
| 273 | + -not $BuildID -and |
| 274 | + ($in.BuildID -ne $null)) { |
| 275 | + $buildID = $psBoundParameters['BuildID'] = $in.BuildID |
| 276 | + } |
272 | 277 |
|
273 | 278 | $q.Enqueue(@{ParameterSet=$ParameterSet} + $PSBoundParameters) |
274 | 279 | } |
|
331 | 336 | )" |
332 | 337 |
|
333 | 338 | $subtypename = @($parameterSet -replace '/{\w+}', '' -split '/')[-1].TrimEnd('s') |
| 339 | + |
334 | 340 | $subtypeName = |
335 | 341 | if ($subtypename -eq 'Build') { |
336 | 342 | '' |
|
349 | 355 | "$Organization.$project.Repository", "$Organization.Repository", "PSDevOps.Repository" |
350 | 356 | } |
351 | 357 |
|
| 358 | + $invokeParams.Property = @{ |
| 359 | + Organization = $Organization |
| 360 | + Project = $Project |
| 361 | + Server = $Server |
| 362 | + } |
| 363 | + |
| 364 | + if ($BuildID) { |
| 365 | + $invokeParams.Property.BuildID = $BuildID |
| 366 | + } |
| 367 | + |
| 368 | + if ($DefinitionID) { |
| 369 | + $invokeParams.Property.DefinitionID = $DefinitionID |
| 370 | + } |
352 | 371 |
|
353 | 372 | if ($Detail) |
354 | 373 | { |
355 | 374 |
|
356 | 375 | $null = $DequedInput.Remove('Detail') |
357 | 376 | $null = $DequedInput.Remove('ParameterSet') |
358 | 377 | $null = $DequedInput.Remove('AsJob') |
359 | | - Invoke-ADORestAPI @invokeParams -Property @{ |
360 | | - Organization = $Organization |
361 | | - Project = $Project |
362 | | - Server = $Server |
363 | | - } | |
| 378 | + Invoke-ADORestAPI @invokeParams | |
364 | 379 | Add-Member NoteProperty ChangeSet -Value (Get-ADOBuild @DequedInput -ChangeSet) -Force -PassThru | |
365 | 380 | Add-Member NoteProperty Timeline -Value (Get-ADOBuild @DequedInput -Timeline) -Force -PassThru | |
366 | 381 | Add-Member NoteProperty Artifacts -Value (Get-ADOBuild @DequedInput -Artifact) -Force -PassThru | |
|
392 | 407 | } |
393 | 408 | else |
394 | 409 | { |
395 | | - Invoke-ADORestAPI @invokeParams -Property @{ |
396 | | - Organization = $Organization |
397 | | - Project = $Project |
398 | | - Server = $Server |
399 | | - } |
| 410 | + Invoke-ADORestAPI @invokeParams |
400 | 411 | } |
401 | 412 | } |
402 | 413 | if ($t -gt 1) { |
|
0 commit comments