Azure Devops API - 如何从 UNC 路径创建和 auto-complete 拉取请求

Azure Devops API - How to create and auto-complete a pull request from a UNC path

在这种情况下,当代码准备好进入管道时,开发人员会将他们的代码放在中央文件共享中。

我目前正在尝试使用 Azure Devops API for "Pull Request - Create" 创建并完成从 UNC 路径到空的 Azure Devops GIT 存储库的拉取请求。

API Documentation

我正在为如何设置 body 来实现这一目标而苦苦挣扎。

我试图从中提取的路径是:

\10.10.10.10\fileshare\code\application.

我目前正在尝试创建的 body 看起来像:

{
  "remoteUrl": "file://.10.10.10\fileshare\code\application",
  "sourceRefName": "origin/master",
  "targetRefName": "master",
  "title": "Automatic Update",
  "description": "Automatically updating the repo",
  "status": "completed"
}

有谁知道这是否可能?如果是这样,我将不胜感激在正确方向上的任何推动。

How to create and auto-complete a pull request from a UNC path

怕说不行,不可能实现。请求正文中的 remoteUrl 表示 git 存储库的 Url,例如 https://Merlin@dev.azure.com/Merlin/UnitTest/_git/dotnet-project.

这是我创建的示例:

可以看到remoteUrl的值为Azure Devops中repos的Url,这是fixed 在您的回购协议存在于组织中并且无法更改之后。

所以,同意 Shayki 和 Daniel 的观点。请让您的同事将其提交到存储库。