How do you get VSTS to build when a PR is created in GitHub? I've tried several triggers in the VSTS build like refs/pull/*/merge
and refs/pull/*/head
. I have a build working when a commit is made to the master branch, but I can't get a build to trigger when a PR is created.
I get the following when a PR is created.
Also, the webhook history shows that a message was successfully posted to VSTS, but the build never starts.
You can set up pull request triggers for both Azure Repos or GitHub repositories. From within your project, Select Pipelines > Releases, and then select your release pipeline. Under the Pull request trigger section, select the toggle button to enable it.
Creating the pull request. On GitHub.com, navigate to the main page of the repository. In the "Branch" menu, choose the branch that contains your commits. Above the list of files, click Pull request.
VS Code allows you to do Pull Requests directly from the editor. To do that you need to be on the GitHub Pull Request page. Click on the create new pull request button. Then choose a target branch to which you want to pull, and from which you want to pull.
The official Microsoft VSTS GitHub Integration extension now supports this directly.
I think it's the trigger. Try what's described in this blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With