Skip to content

Instantly share code, notes, and snippets.

@xjm
Forked from msonnabaum/drupal8_contrib.rb
Created January 22, 2012 22:01
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 xjm/1659061 to your computer and use it in GitHub Desktop.
Save xjm/1659061 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'pp'
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 = p.gsub(/et all?/, '')
p.strip!
contributors[p] += 1 unless p.nil?
end
end
end
pp contributors.sort_by {|key, value| value}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment