microsoft / azure-devops-go-api

This repository contains Go APIs for interacting with and managing Azure DevOps.
https://docs.microsoft.com/en-us/azure/devops/integrate/index?view=azure-devops
MIT License
187 stars 78 forks source link

Pipeline general setting -Cannot config disable creation of classic build and classic release pipelines #133

Open xuzhang3 opened 1 year ago

xuzhang3 commented 1 year ago

API: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/general-settings/update?view=azure-devops-rest-7.1 Cannot modify disableClassicPipelineCreation though API v7.0, 7.1-preview.1 even with ORG configuration disabled.

image
citrix-pradeep commented 1 year ago

When can we expect fix for this .. or any alternative api to disable this.

citrix-pradeep commented 1 year ago

Tried below code but doesnt seems to be working.

$url = "https://dev.azure.com/$organization/$project/_apis/build/generalsettings?api-version=7.1-preview.1"

$headers = @{ Authorization = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($pat)")) }

$body = @{ disableClassicBuildPipelineCreation = $true } | ConvertTo-Json

$response = Invoke-RestMethod -Uri $url -Method Patch -Headers $headers -ContentType "application/json" -Body $body
xuzhang3 commented 1 year ago

@citrix-pradeep This is API bug and confirmed by service team.

quilter-sridharadama commented 1 year ago

Commenting for solution.

quilter-sridharadama commented 1 year ago

any update on this?

xuzhang3 commented 11 months ago

disableClassicPipelineCreation is replaced by disableClassicReleasePipelineCreation, disableClassicBuildPipelineCreation. Hope SDK will fix this issue.