Create a Pull Request as part of build step in VSTS

Viewed 6396

We are using VSTS for our build server and for version control.

As part of our build process I would like to create a Pull Request from master branch to develop branch (for build running on master only). I know there is an API endpoint to do that.

But I wonder if there is a better way to handle it? Like a custom step that does it (and I've missed it)?

2 Answers

You can install the Create Pull Request extension, it gives you the ability to create a pull request automatically from your build pipeline:

enter image description here

For now, there is no better way for that.

Even if you use a webhook to trigger the event when the build is successful for master branch, the main step is to use the REST API to create a PR. And there is no such extension task in marketplace.

But in the future, when the server side hooks are available for VSTS, you can use post-push hook to update develop branch automatically after changes are merged from bugfix branch into master branch.

Related