【问题标题】:Retrieve pull request ID from a commit从提交中检索拉取请求 ID
【发布时间】:2019-06-29 01:38:51
【问题描述】:

在我当前的 Azure 设置中,我需要从提交到该分支中触发的构建中检索拉取请求 ID。

我发现了这个:How can I get the PullRequestId via a BuildId?,但这是来自拉取请求,而不是提交。如果您提交,parameters 对象为空。

【问题讨论】:

    标签: azure azure-devops


    【解决方案1】:

    A way to do this is by listing all the open pull requests

    Retrieve the build information

    使用构建中的sourceBranch 在拉取请求列表中找到sourceRefName。然后你就有了正确的拉取请求,你可以使用pullRequestId 来检索拉取请求ID。

    【讨论】:

      猜你喜欢
      • 2021-12-21
      • 2011-05-05
      • 1970-01-01
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-21
      • 2014-04-15
      相关资源
      最近更新 更多