Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Last active September 29, 2015 19:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save msonnabaum/1655133 to your computer and use it in GitHub Desktop.
Save msonnabaum/1655133 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'yaml'
contributors = Hash.new(0)
%x[git log 8.x --since=2011-03-09 -s --format=%s].split("\n").each do |m|
m.scan(/\s(?:by\s?)([\w\s,.|]+):/i).each do |people|
people[0].split(/[,|]/).each do |p|
p.strip!
contributors[p] += 1 unless p.nil?
end
end
end
contributors = Hash[contributors.sort_by {|k, v| v }.reverse]
puts contributors.to_yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment