调用Azure DevOps构建API遇仓库类型错误,该如何填写?
解决Azure DevOps构建API的“Repository type is missing/invalid”错误
调用该构建API触发构建时,必须通过repositoryType参数指定仓库类型,不同仓库对应的有效值如下:
- Azure Repos Git:
TfsGit - GitHub:
GitHub - Bitbucket Cloud:
BitbucketCloud - Subversion:
Svn
以Azure Repos Git为例,修正后的请求URL示例:
"https://dev.azure.com/{organization}/{project}/_apis/build/builds?repositoryId=<repository-name>&branchName={branchName}&repositoryType=TfsGit&api-version=7.0"
额外提示:repositoryId优先使用仓库的GUID而非名称,名称可能存在重复或识别失败的问题,仓库GUID可在Azure DevOps仓库的设置页面中获取。
内容的提问来源于stack exchange,提问作者user989988
相关产品推荐
相关产品推荐

