Created
February 9, 2012 23:43
-
-
Save insom/1784354 to your computer and use it in GitHub Desktop.
Use Github V3 API to display grouped commits by person by day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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