Skip to content

Commit

Permalink
Adding debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Mar 26, 2024
1 parent aaacc4b commit df22a92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/Public/Set-ADOEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ function Set-ADOEnvironment
$checkId = $envChecks.value.Id

$checkUrl = "{0}/_apis/pipelines/checks/configurations/{2}?`$expand=settings&{1}" -f $devOpsProjectUrl, $apiVersionString, $checkId
Write-Log -Object " DEBUG: $checkUrl"
$checkInfo = Invoke-APRestApi -Uri $checkUrl -Method 'GET' -Headers $headers
if ($null -ne $checkInfo)
{
Expand Down Expand Up @@ -367,8 +368,10 @@ function Set-ADOEnvironment
{
Write-Log -Object ' Updating check configuration'
$requestBody = ConvertTo-Json -InputObject $obj -Depth 10
Write-Log -Object " DEBUG: $requestBody"

$configUrl = '{0}/_apis/pipelines/checks/configurations/{2}?{1}' -f $devOpsProjectUrl, $apiVersionString, $checkId
Write-Log -Object " DEBUG: $configUrl"
if ($PSCmdlet.ShouldProcess('Configurations','Configure approvals'))
{
$null = Invoke-APRestApi -Uri $configUrl -Method 'PATCH' -Headers $headers -Body $requestBody
Expand Down

0 comments on commit df22a92

Please sign in to comment.