简体   繁体   English

如何找到特定回购的 Azure 构建项

[英]How to find Azure Build Items for a specific repo

I am trying to fetch the list of all build items in Azure, and using Postman the following URL shows me the result:我正在尝试获取 Azure 中所有构建项目的列表,并使用 Postman 以下 URL 向我显示结果:

https://dev.azure.com/MyOrganization/MyProject/_apis/build/builds?api-version=6.0

But there is one problem, the query shows me the build for all our company projects whereas I am only intersted in one但是有一个问题,查询显示了我们所有公司项目的构建,而我只对一个感兴趣

在此处输入图像描述

The query returns for all projects, but I am only interested in build for Project B查询返回所有项目,但我只对项目 B 的构建感兴趣

How can I specify this information in the API?我如何在 API 中指定此信息? I tried the filters and it doesn't work.我尝试了过滤器,但它不起作用。 Also the same for tags标签也一样

If you take a look at the API Build List documentation , you can see the optional parameters that can be passed to this request如果您查看API Build List 文档,您可以看到可以传递给此请求的可选参数

In this case, you would want to filter on builds from the project B repository, which requires the repositoryType parameter to be passed as well.在这种情况下,您可能希望过滤来自项目 B 存储库的构建,这也需要传递 repositoryType 参数。 As such you'd be looking to call因此,您希望致电

https://dev.azure.com/{organization}/{project}/_apis/build/builds?repositoryID={repoID}&repositoryType=Git&api-version=6.0

Where the repoID can be found be going into project settings-->repository, clicking the project B repo and copying the value that appears in the website URL after repo=可以找到repoID的地方是进入项目设置-->存储库,点击项目B repo并复制repo =后网站URL中出现的值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 REST API 列出 azure 回购中内容的文件 - How to list the files with content that are in azure repo using REST API 如何为 CI/CD 集成 amplify 的 azure repo? - How to integrate azure repo from amplify for CI/CD? 如何删除 Github 工作流程,Azure Webapp CD / CI with Github Repo - How to remove Github workflow, Azure Webapp CD / CI with Github Repo Azure DevOps 管道构建和发布日志如何锁定到特定组? - How can Azure DevOps pipeline build and release logs be locked down to a specific group? 如何在 Azure DevOps 中访问其他组织的 repo? - How to access repo from other organizations with in the Azure DevOps? 如何从 node.js package.json 文件克隆 Azure Dev Ops 存储库? - How to clone a Azure Dev Ops repo from node.js package.json file? 如何在我的 GitHub 热图中显示我在 azure 回购中的贡献 - How do I make my contributions in azure repo show in my GitHub heatmap Azure Devops:如何配置我的管道脚本以触发具有不同 repo 的另一个管道? - Azure Devops: how configure my pipeline script to trigger another pipeline with different repo? 如何在子目录中构建 Azure 函数应用程序 (TypeScript) - How to build an Azure Functions app (TypeScript) in a subdirectory 如何查找 Azure 文件是否存在于 NodeJS - How to find if Azure File exists on NodeJS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM