Azure DevOps Services REST API:等效于以下内容是什么:git branch –contains

huangapple go评论67阅读模式
英文:

Azure DevOps Services REST API: What is the equivalent to: git branch --contains <commit>

问题

我使用Azure DevOps Services REST API,我的问题是识别来自阶段的合并。

想法是获取迭代和提交,然后从每个提交中找到父提交,并查看是否已经在阶段中。这意味着特定的提交是来自阶段的合并。

问题是我找不到一种方法来知道提交是否已经在阶段中。这就是我期望在API中有类似于contains的东西的地方。是否有类似的东西?
或者有其他替代方法吗?

英文:

I use the Azure DevOps Services REST API, my problem is to identify a merge coming from stage.

The idea would be to get the iterations and the commits, and from each commit find the parent and see if it is already in stage. That would mean that a particular commit is a merge from stage.

The problem is that I don't find a way to know if a commit is already in stage. This is where I would expect something like contains in die API. Is there something like this ?
Or an alternative ?


    git branch --contains &lt;commit&gt;

答案1

得分: 1

你是否已经探索了以下Azure DevOps Rest API端点:

GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.itemVersion.version=master&amp;api-version=4.1

参考链接:Azure DevOps Git Commits - List

示例响应:

Azure DevOps Services REST API:等效于以下内容是什么:git branch –contains <commit>?

英文:

Have you explored the following Azure DevOps Rest API endpoint:

> GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/commits?searchCriteria.itemVersion.version=master&amp;api-version=4.1

Ref: Azure DevOps Git Commits - List

Sample Response:

Azure DevOps Services REST API:等效于以下内容是什么:git branch –contains <commit>?

huangapple
  • 本文由 发表于 2023年1月9日 15:47:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/75054377.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定