0

I am using Github as my repo as well as my Kanban/Scrum board. We use Visual Studio Team Services for our automated builds. We really like the way VSTS works and it works well with Github as the repo.

However, I want to be able to create a new Github issue/bug if and when our Continuous Integration build fails. I know you can create a VSTS Work Item but I would rather keep all issues centralized.

Is there any way to hook up VSTS to create a Github repo whenever a build fails? Or perhaps create a Github issue whenever a new VSTS Work Item is created?

We are running our own build server so possibly something can be done on that end?

John Murphy
  • 905
  • 1
  • 10
  • 26

1 Answers1

1

Yes, you can create a github issue when VSTS build failed with two options.

Option1:

In VSTS build definition, add a powershell task in the end of the build process. Functions in the powershell should include:

  1. Detect above build tasks in the build definition. Use REST API timeline to get build detail, you can find each task result in result parameter.
  2. Determine to create a github issue or not. If all above build tasks are pass to build, don’t create github issue. Else, create a github issue by github API.

Option2:

Create your own website, and in VSTS use web hooks to tigger build fail information for your own website. After your own website receive the build information, it can create a github issue.

Community
  • 1
  • 1
Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • How would you detect that individual build tasks have failed? We are doing MSBuild and also running command line and batch files. – John Murphy Mar 14 '17 at 14:45
  • 1
    You can use REST API **timeline** to get build details https://www.visualstudio.com/en-us/docs/integrate/api/build/builds#timeline, then you can find each build task result in **`result`** parameter. – Marina Liu Mar 15 '17 at 08:02