Trigger Visual Studio Team Services Built for GitHub Pull Request

How do you get VSTS to create when PR is created on GitHub? I tried several triggers in the VSTS assembly, for example refs/pull/*/merge and refs/pull/*/head . I have an assembly that works when commit is done with the main branch, but I can’t get the assembly to start when creating the PR.

I get the following when a PR is created. enter image description here

In addition, the webhook history shows that the message was sent successfully to VSTS, but the build never starts.

+5
source share
4 answers

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

+1
source

I think this is a trigger. Try what is described in this post.

+1
source

There is no easy way to enable this today for PR. It is behind the VSTS function that we want to talk about shortly.

The way to get it working today is to do something like: add a webhook to call its own service endpoint. Within your service endpoint, you could then call VSTS for the build queue, and the build will need a step to post success / rollback to GitHub.

At the endpoint of the user service, you need to make sure that the user is logged in as a member in the GitHub repository.

0
source

In the new VSTS user interface, you can find it in Build Edit -> Triggers:

0
source

Source: https://habr.com/ru/post/1261097/


All Articles