Created
October 31, 2013 04:35
-
-
Save jacklynrose/7244414 to your computer and use it in GitHub Desktop.
Grabbing the commit stats by week for the past year for the rails/rails repo
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
$.getJSON("https://api.github.com/repos/rails/rails/stats/commit_activity", function(data) { | |
var week_count = 1; | |
var commits_by_week = data.map(function(week) { | |
var total = 0; | |
$.each(week['days'], function(k, v) { total += v }); | |
return total; | |
}); | |
$.each(commits_by_week, function (k, v) { | |
console.log("Week " + week_count + ": " + v + " commits"); | |
week_count++; | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment