2
votes

I have developed a tiny library that I chose to host on GitHub. The code is being built by a VSTS build and published as a NuGet package.

I have written a README.md file and I am trying to include a Build badge on it, as described in the Microsoft documentation. Consequently, I have added the following line in the MD file and replaced the placeholders accordindly:

![Build status](https://{my-organisation}.visualstudio.com/{my-project}/_apis/build/status/{my-build-definition-name}?branch=master)

The problem is that the link is not accessible to anyone that is not logged-in on VSTS and I end up with a 'broken' link on my readme page:

enter image description here

Question

What must be done to make the VSTS Build Badge available to a GitHub repo?

1

1 Answers

3
votes

I suppose you must include an authentication token of sorts in order to have at least read-access to the VSTS build from your GitHub page.

Note that the documentation lists also multiple pending issues, including MicrosoftDocs/vsts-docs issue 1499:

Build status badge added to GitHub readme doesn't show up.

So this is still in progress.

On that last issue, it says:

This is due to public vs. private projects.
If you make your project public the image URL will render.
There are other potential workarounds we are looking at for the doc.

See "Change the project visibility, public or private".