是否可以使用 API 为 Azure DevOps 中的管道设置"Default branch for manual and scheduled builds"?



是否可以设置"用于手动和计划构建的默认分支";对于使用Azure DevOps REST API的管道?

是的,当您使用Builds-update build Rest API更新构建时,您可以在主体中发送repository属性,在主体中,您可以设置defaultBranch:

repository: 
checkoutSubmodules: false
clean: "false"
defaultBranch: "refs/heads/master"
id: "7d9431dc-be40-48f6-a8dd-c12312424"
name: "Test"

您可以在此处找到所有存储库选项。

相关内容

最新更新