Skip to content

Instantly share code, notes, and snippets.

@insom
Created February 9, 2012 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insom/1784354 to your computer and use it in GitHub Desktop.
Save insom/1784354 to your computer and use it in GitHub Desktop.
Use Github V3 API to display grouped commits by person by day
U = require 'underscore'
H = require 'scoped-http-client'
T = require 'util'
H.create('https://api.github.com/')
.header('accept', 'application/json')
.path('repos/insom/pymogile/commits')
.get() (e, r, b) ->
v = U.map JSON.parse(b).filter((item) -> item['committer']),
(item) -> [item['url'], item['commit']['committer']['name'],
item['commit']['committer']['date'].substring(0,10)]
x = U.groupBy v, (i) -> [i[2], i[1]]
T.puts T.inspect x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment