3

I am trying to do the following:

  • A developer (e.g.: James) could be working on this private branch (e.g.: james/add-custom-logger) for a while before sending out a PR.
  • Once James sends out a PR, I would like to automatically trigger a build for that PR branch.

I am struggling to figure out how to do this in VSTS builds.
I know that I could setup build triggers based on branches like feature/* and could ask all developers to follow that pattern, so in this case it would be feature/james/add-custom-logger.

But I don't want to trigger those branches until a pull request is sent for those branches.

Any ideas on how to achieve this?

Dave
  • 5,108
  • 16
  • 30
  • 40
Kiran
  • 56,921
  • 15
  • 176
  • 161

1 Answers1

3

Maybe branch policies fit your scenario. If james always creates the PR to the same branch - for example 'master' - you can create a branch policy for 'master'. Go to Repos > Branches > ... (More Actions) > Branch policies > Build validation > Add build policy

renklus
  • 776
  • 6
  • 17