1
votes

In this situation, devs will drop their code off in a central fileshare when it's ready to enter the pipeline.

I'm currently attempting to work with the Azure Devops API for "Pull Request - Create" to create and complete a pull request from a UNC Path to an empty Azure Devops GIT repo.

API Documentation

I am struggling with how to setup the body to accomplish this.

The path that I am trying to pull from would be:

\\10.10.10.10\fileshare\code\application.

The body that I am currently trying to create looks like:

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

Does anyone know if this is even possible? If so, I would greatly appreciate any nudges in the right direction.

1
Do you try to create a PR to git repo that exist only in your file share?Shayki Abramczyk
I'm sorry. Can you elaborate?nuprap
remoteUrl is the git repo url. in fact you not need it in the body because in the url you have the repo id. so how the file share is connected to the remoteUrl?Shayki Abramczyk
Why would people put their code in a file share? Teach them to use Git. Have them commit to a repository.Daniel Mann
To clarify, there is a git repo at the UNC file share location. Due to technical restraints, I am not able to push into TFS and need to pull it from the fileshare.nuprap

1 Answers

1
votes

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

Afraid to say that No, it could not be possible to achieve. The remoteUrl in request body means the Url of the git repos, like the https://[email protected]/Merlin/UnitTest/_git/dotnet-project.

This is the sample I created:

enter image description here

You can see that the value of remoteUrl is the Url of repos in Azure Devops, this is fixed after your repos exists in the org and could not be changed.

So, agree with Shayki and Daniel. Please let your colleague commit it to repository.