Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger Visual Studio Team Services build for a GitHub Pull Request

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. enter image description here

Also, the webhook history shows that a message was successfully posted to VSTS, but the build never starts.

like image 997
viperguynaz Avatar asked Dec 10 '16 22:12

viperguynaz


People also ask

How do you trigger a pull request Build?

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.

How do I trigger a pull request GitHub?

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.

How do I create a pull request code in Visual Studio?

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.


2 Answers

The official Microsoft VSTS GitHub Integration extension now supports this directly.

like image 80
Lukas Spieß Avatar answered Oct 06 '22 01:10

Lukas Spieß


I think it's the trigger. Try what's described in this blog post.

like image 33
Buck Hodges Avatar answered Oct 06 '22 01:10

Buck Hodges