Skip to content

pikesley/githubbadges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Dependency Status Coverage Status Code Climate Github Issues Pending Pull-Requests License Badges

#Github Badges

##Dynamically-generated shields.io badges

v0.0.3

###API

####/:owner/:repo/issues[?style={square, flat-square}]

Will redirect to a shields.io badge containing a count of the open Github issues on :owner/:repo. Defaults to SVG, append .png for a PNG version. Style parameter is optional, redirects to the appropriate badge style.

####/:owner/:repo/pulls[?style={square, flat-square}]

Will redirect to a shields.io badge containing a count of the pending pull-requests on :owner/:repo. Defaults to SVG, append .png for a PNG version. Style parameter is optional, redirects to the appropriate badge style.

####Undocumented

Almost certainly works for other :owner/:repo/{something} API endpoints, too. If it responds to #count, then it should return something sensible.

###Colours

The choice of colours is kind of arbitrary (and almost certainly subject to change). The current rules are:

case count
  when 0
    'brightgreen'
  when 1..3
    'blue'
  when 4..6
    'orange'
  else
    'red'
  end
end