1
votes

Upon creating a pull request from a source to a target branch, is there a possibility to prevent the creation of a pull request if no work item is entered?

I know in branch policies there is the option to prevent merging unless a work item is entered, however I would like to create a PR only if a related work item is assigned a priori.

enter image description here

2

2 Answers

0
votes

I think this information would help.

Work items: For only add tickets which are prioritized so reviewers get an idea about the tickets which you are pushed/merged.

And Work items are not required when you can create a PR. If you add a ticket then add otherwise it will be blank and create a PR.

0
votes

you need to create a branch policy and enforce linked items:

enter image description here

this is under the following url: https://dev.azure.com/%org%/%project%/_settings/policies

or using the UI: project settings > policies

ps. this will allow to create pull request without those, but wont allow to complete it, which should suit you fine