-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a git mailmap to correct contributor names
Git can natively map names. This keeps a mailmap in this repository and copies it in the (temporarily) cloned repositories if it doesn't exist. Then it relies on git to do the right thing. The mailmap is not a complete translation of the existing mapping since it also contains people who haven't contributed in a long time. It also adds a few missing items.
- Loading branch information
Showing
2 changed files
with
86 additions
and
94 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
require 'tmpdir' | ||
require 'git' | ||
|
||
MAILMAP = File.join(__dir__, '..', '.mailmap') | ||
|
||
@tag_from = "3.4.0" | ||
@tag_to = "3.5.0-rc1" | ||
@date_from = nil # derived from the tag | ||
|
@@ -43,106 +45,15 @@ | |
puppetdb_foreman | ||
) | ||
|
||
@author_map = { | ||
"aabramov" => "Adi Abramovich", | ||
"abenari" => "Amos Benari", | ||
"adamruzicka" => "Adam Ruzicka", | ||
"Alexander Fisher" => "Alex Fisher", | ||
"alongoldboim" => "Alon Goldboim", | ||
"Daniel Lobato" => "Daniel Lobato Garcia", | ||
"Daniel Lobato García" => "Daniel Lobato Garcia", | ||
"Dirk Goetz" => "Dirk Götz", | ||
"Eric D Helms" => "Eric D. Helms", | ||
"Eric Helms" => "Eric D. Helms", | ||
"Joseph Magen" => "Joseph Mitchell Magen", | ||
"Ivan Necas" => "Ivan Nečas", | ||
"Lukas Zapletal" => "Lukáš Zapletal", | ||
"Marek Hulan" => "Marek Hulán", | ||
"mbacovsky" => "Martin Bačovský", | ||
"amirfefer" => "Amir Fefer", | ||
"Amir Feferkuchen" => "Amir Fefer", | ||
"Amir" => "Amir Fefer", | ||
"imriz" => "Imri Zvik", | ||
"Sean OKeeffe" => "Sean O'Keeffe", | ||
"treydock" => "Trey Dockendorf", | ||
"orrabin" => "Ori Rabin", | ||
"Ondrej Prazak" => "Ondřej Pražák", | ||
"lfisher47" => "Leah Fisher", | ||
"pkranenburg" => "Paul Kranenburg", | ||
"alejandrocfg" => "Alejandro Falcon", | ||
"chbaldwi" => "Chris Baldwin", | ||
"dhlavac" => "Dominik Hlavac", | ||
"kgaikwad" => "Kavita Gaikwad", | ||
"lizagilman" => "Liza Gilman", | ||
"marten" => "Marten Veldthuis", | ||
"matan" => "Matan Uberstein", | ||
"matanwerbner" => "Matan Werbner", | ||
"oogs" => "Chris Baldwin", | ||
"thomasmckay" => "Thomas McKay", | ||
"Zjhuntin" => "Zach Huntington-Meath", | ||
"Adam Růžička" => "Adam Ruzicka", | ||
"Dominik Hlavac Duran" => "Dominik Hlavac", | ||
"Fabien COMBERNOUS" => "Fabien Combernous", | ||
"bshuster" => "Boaz Shuster", | ||
"jyejare" => "Jitendra Yejare", | ||
"ldjebran" => "Djebran Lezzoum", | ||
"UXabre" => "Arend Lapere", | ||
"ofedoren" => "Oleh Fedorenko", | ||
"swadeley" => "Stephen Wadeley", | ||
"odovzhenko" => "Oleg Dovzhenko", | ||
"Luuk" => "Luuk Hafkamp", | ||
"Alexander \"Ananace\" Olofsson" => "Alexander Olofsson", | ||
"Sebastian Gräßl" => "Sebastian Gräßl", | ||
"boaz1337" => "Boaz Shuster", | ||
"kamils-iRonin" => "Kamil Szubrycht", | ||
"laviro" => "Ron Lavi", | ||
"Ahmet DEMIR" => "Ahmet Demir", | ||
"[email protected]" => "Arend Lapere", | ||
"MariaAga" => "Maria Agaphontzev", | ||
"Maria" => "Maria Agaphontzev", | ||
"magaphon" => "Maria Agaphontzev", | ||
"stefanlasiewski" => "Stephan Lasiewski", | ||
"dima" => "Dima Berastau", | ||
"damon" => "Damon Clinkscales", | ||
"hao-yu" => "Hao Chang Yu", | ||
"Rohan21Lobo" => "Rohan Arora", | ||
"amard33p" => "Amardeep Kahali", | ||
"ianballou" => "Ian Ballou", | ||
"san7ket" => "Sanket Jagtap", | ||
"sjha4" => "Samir Jha", | ||
"yifatmakias" => "Yifat Makias", | ||
"sthirugn" => "Sureshkumar Thirugnanasambandan", | ||
"swetha" => "Swetha Seelam Lakshmi Narayanan", | ||
"jkalchik" => "Jeff Kalchik", | ||
"fschaer" => "Frederic Schaer", | ||
"ksagarwal007" => "Kaushik Agarwal", | ||
"neilfromit" => "Neil Townsend", | ||
"William Bradford Clark" => "William Clark", | ||
"calvingsmith" => "Calivn Smith", | ||
"grizzthedj" => "Chris Smith", | ||
"tomabg" => "Thomas Pietzka", | ||
"Emil DRAGU" => "Emil Dragu", | ||
"vsedmik" => "Vladimir Sedmik", | ||
"hsahmed" => "Hesham S. Ahmed", | ||
"Mirek Długosz (Mirosław Długosz-Zalewski)" => "Mirek Długosz", | ||
"JaskaranNarula" => "Jaskaran Singh Narula", | ||
"r.stricklin" => "R. Stricklin", | ||
"brimioulle" => "Fabrice Brimioulle", | ||
"nofar" => "Nofar Alfassi", | ||
"nofaralfasi" => "Nofar Alfassi", | ||
"kmalyjur" => "Karolina Malyjurkova", | ||
"tux93" => "Marcel Kühlhorn", | ||
"snemeth" => "Štefan Németh", | ||
"Stejskal Leos" => "Leos Stejskal", | ||
} | ||
|
||
@authors={} | ||
|
||
def get_repo_committers repo, tagged = false | ||
$stderr.puts "Parsing committers for #{repo}" | ||
raw = [] | ||
g = Git.clone("https://github.com/theforeman/#{repo}", repo) | ||
g.chdir do | ||
FileUtils.cp(MAILMAP, '.mailmap') unless File.exist?('.mailmap') | ||
|
||
if tagged | ||
raw = `git log #{@tag_from}..#{@tag_to} --pretty="%aN" --abbrev-commit`.split("\n") | ||
|
||
|
@@ -154,7 +65,6 @@ def get_repo_committers repo, tagged = false | |
end | ||
end | ||
raw.each do |author| | ||
author = @author_map.fetch(author, author) | ||
@authors[author] ||= Hash.new(0) | ||
@authors[author][repo] += 1 | ||
end | ||
|