When I'm looking for a badge with status for given branch I'm using branch
parameter in URL. I'd like to do the same with the link to the latest build or build history of a given branch.
If this is not possible currently I'd be more than happy having such feature provided.
Click on the badge to fill in required data elements for that badge type (like your username or repo) and optionally customize (label, colors etc.). And it's ready for use! Use the button at the bottom to copy your badge url or snippet, which can then be added to places like your GitHub readme files or other web pages.
To add a workflow status badge to your README.md file, first find the URL for the status badge you would like to display. Then you can use Markdown to display the badge as an image in your README.md file. For more information about image markup in Markdown, see "Basic writing and formatting syntax."
GitHub Badges can boost the readability of the GitHub repositories because they provide users with a fast way to capture repository metrics. Badges are supposed to be embedded in your README.md which elucidates the importance and necessity of your project to other developers.
Travis doesn't seem to currently implement this.
There is an open issue requesting such a feature though:
https://github.com/travis-ci/travis-ci/issues/1996
If you need URL, the only workaround is to point to:
https://travis-ci.org/{owner_name}/{repo_name}/branches
which would list all branch build history.
Otherwise access to branch build history this can be achieved via Travis CI API in JSON format (as discussed in GH #1996), so it's:
https://api.travis-ci.org//v3/repo/{repository.id}/branch/{branch.name}
To find your repository.id
, see: What is the “repository ID” discussed in the Travis-CI API?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With