github-basic-badges
github-basic-badges copied to clipboard
Basic badges for github
GitHub Basic Badges
Basic badges for using with GitHub, and a service that you can deploy and create your own service to serve the GitHub badges.
Motivation
I know there are alots of services that you can generate badges for GitHub, i just developed one more to play around with Ruby and Heroku.
Badges
All the URL Patterns showed in the table bellow must be used as <app-url>\<url-pattern>
.
URL Pattern | Description | Preview |
---|---|---|
downloads/<user>/<repo>/total.svg |
Sum of downloads of all artifacts in the latest release. | |
downloads/<user>/<repo>/<tag>/total.svg |
Sum of downloads of all artifacts in the release with the <tag> |
|
downloads/<user>/<repo>/<file>.svg |
Total downloads of the artifact named <file> in the latest release. |
|
downloads/<user>/<repo>/<tag>/<file>.svg |
Total downloads of an artifact named <file> in the release with a tag name <tag> . |
|
release/<user>/<repo>.svg |
Latest release tag name. | |
issues/<user>/<repo>.svg |
Total issues open. | |
commits/<user>/<repo>.svg |
Total commits. | |
license/<user>/<repo>.svg |
Project LICENSE. | |
pulls/<user>/<repo>.svg |
Project open pull requests. |
Custom colors and text
You can customize the colors and the text of the badges, just use color
and text
parameters in the url, like customizing the last release example, check below:
For colors you can use any hex colors you want, and some basic already defined, check the file badge.rb for some basic colors.
Deploying on Heroku
Install heroku toolbet and log to it after that, it's pretty straigth forward deploying on heroku, just do the following:
# Cloning the repository
git clone https://github.com/kennedyoliveira/github-basic-badges.git
cd github-basic-badges
# Create a heroku app
heroku create
# Push the code to heroku
git push heroku master
# Open the app
heroku open
Mine Heroku App
My instance is running in the following url https://github-basic-badges.herokuapp.com
you can use it to generate badges for your repos!
If you have any question or suggestion, open an issue!