rest - TeamCity REST API 获取待定更改列表

标签 rest teamcity teamcity-8.0

是否有 REST API 端点来获取 TeamCity 中等待构建的更改集合?

我们将build设置为手动,它在 TeamCity 外部触发,并希望显示该构建中提交的项目符号列表。

在用户界面中,您可以在“Pending Changes (X)”选项卡下看到这一点。

我找不到任何这样做的例子,我发现的最接近的是:

http://<server>/httpAuth/app/rest/changes/buildType:<build type id>

不过,这似乎返回了最后一次更改。

以前有人做过这个吗?

最佳答案

由于这个问题,我刚刚找到了一个有效的解决方案。如果其他人正在寻找完整的解决方案,我会在这里展示它:

您需要知道buildTypeId您想要在其上获取挂起更改的构建。在这种情况下,可以说 buildTypeId=bt85

1
    http://<server>/httpAuth/app/rest/buildTypes/id:bt85/builds/
    // Get the last build from the XML returned.
    // Lets say last build id = 14000

2

    http://<server>/httpAuth/app/rest/changes?build=id:14000
    // The newest change returned is the one you need.
    // Lets say newest change id = 15000

3

    http://<server>/httpAuth/app/rest/changes?buildType=id:bt85&sinceChange=15000
    // You're now looking at the pending changes list of the buildType bt85

关于rest - TeamCity REST API 获取待定更改列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21673173/

相关文章:

teamcity - 如何从 Git 获取完整的变更日志作为 TeamCity 中的工件

mysql - 从 mysql 中的触发器或存储过程调用 REST API?

c# - ServiceStack,如何接入业务逻辑Pocos?

git - 内部版本号中的分支名称

teamcity - 使 TeamCity 始终发布工件

TeamCity REST API 获取当前损坏项目的列表

java - 是否可以为 @Valid 参数异常创建多个自定义验证消息?

javascript - header ("Content-Type": "image/jpeg") for Swagger UI.

powershell - Close-SMBOpenFile 抛出错误并且未在 try-catch 中捕获

TeamCity:给非注册用户的电子邮件通知