Last active
October 20, 2017 13:34
-
-
Save vindia/4560140 to your computer and use it in GitHub Desktop.
Simple Ruby + Git script to get a commit leaderboard for your repository.
This file contains hidden or 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
def leaderboard(project) | |
leaderboard = [] | |
committers = `cd ~/#{project}; git checkout master; git shortlog -nse --no-merges --since={last.month}` | |
committers.split("\n").each do |committer| | |
c = committer.split("\t") | |
leaderboard.push name: c.last.split('<').first.strip, values: [c.first.to_i] | |
end | |
leaderboard | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment