Reputation: 79
I have troubles figuring out how I can create pull request which can get declined or approved and immediately merged afterward.
I am using Azure DevOps.
I searched around but I can't seem to find anything (even on Microsoft's website) any help.
I am not using Git, instead, Team Foundation Version Control (TFVC).
I checked over there : https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/?view=azure-devops
Still nothing. What am I missing ?
Upvotes: 3
Views: 1921
Reputation: 115025
The concept of a Pull Request exists in Git only. These is no direct equivalent in TFVC. The recommendation would be to switch to Git if this is how you'd want to work. TFVC adds a lot of overhead to branching and doesn't support Pull Request and pull request validation using pipelines directly.
Closest you get is a Code Review request and a Shelveset build.
Instead of Checking in your code you can Request Review, which will open a Code Review work item and will create a Shelveset containing your changes.
You can also request a code review on a not-yet checked-in merge. Which would be the closest to a pull-request, but having to create and manage branches that way in TFVC has far more overhead than in Git.
Then when the code review is approved, you can go ahead and directly commit the changes, or you could do a shelveset build by selecting your shelveset upon queuing. This will validate your changes without checking them in.
You can use the "Gated Checkin options" to only check in, but require the build to succeed on success:
You may need to use my TFVC Checkin task to perform the checkin upon a condition of your chosing.
You can make that step conditional using the condition editor:
Upvotes: 7