简体   繁体   English

使用REST API获取与Azure Devops中的构建关联的更改

[英]Get changes associated with a build in Azure Devops using REST API

In Azure Devops under the "Summary" tab associated with a build, there are a list of changes (Git hashes, etc.) associated with the build. 在与构建相关联的“摘要”选项卡下的Azure Devops中,存在与构建相关联的更改列表(Git哈希等)。 I'm trying to figure out how to get these via the rest API. 我试图弄清楚如何通过其余的API获得这些。

I found this REST API to get the changes between the two builds . 我发现此REST API可以在两个版本之间进行更改

It works if I have the previous build id in the pipeline, however in the situation I'm interested in, I have the current build id, I need to somehow use the REST API to find the previous id. 如果我在管道中具有先前的构建ID,那么它可以工作,但是在我感兴趣的情况下,我具有当前的构建ID,我需要以某种方式使用REST API来查找先前的ID。

Is there a way to do this using the REST API, or a better way to accomplish what I'm trying to do here? 有没有一种使用REST API做到这一点的方法,或者是一种更好的方法来完成我在这里要做的事情?

As far as I can see, there's a special REST API call for that . 据我所知,有一个特殊的REST API调用 You pass the buildId as a part of the URL and get the collection of changes ( Change[] ) in response. 您将buildId作为URL的一部分传递,并获得更改的集合( Change[] )作为响应。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM