问题
The only workaround we found for validating pull requests in visual studio online currently is to create a visual studio build definition that triggers our jenkins job, and create a branch policy on that build definition.
But Visual Studio online is able to trigger the jenkins job directly when a git pull request is created / updated.
Is it possible to create a branch policy on the outcome of that jenkins job? The TFS plugin already provides status feedback for the "normal push" build status.
回答1:
It is impossible now, I submit a user voice here: Branch policy based on jenkins job, you can vote and follow up it.
来源:https://stackoverflow.com/questions/43374234/validate-pull-request-with-jenkins-in-vsts