Dec 30, 2014 How to embed live Github PR status in your blogs & docs
[update: API is now at https://github-shields.com]
The following badges reflect the status of some pull requests and issues:
This might be handy for you in blog posts ("I raised a bug for that [badge]"), documentation and READMEs.
There isn't yet a nice website to help you construct the URLs. Sorry. But the URL structures are very similar to GitHub's own URLs.
Consider the PR https://github.com/cloudfoundry/bosh/pull/715. The URL doesn't indicate if the PR is open/merged/closed.
cloudfoundry/bosh/pull/715 portion of the URL is copied directly into the following base URL:
.svg gives a URL that redirects to the PR.
As an image URL it gives
Awesome, it was merged!
As a convenience,
cloudfoundry/bosh/pull/715 gives a URL that redirects to the PR itself on GitHub.
Compose the two together and you get clickable shields/badges.
In markdown this might be:
Hopefully this makes our blog posts, comments and READMEs more exciting!
Run it yourself for private repos
See https://github.com/drnic/github-shields for instructions for deploying it yourself so you can access your private repo's issues/PR statuses.