Skip to content

Commit

Permalink
Use a git mailmap to correct contributor names
Browse files Browse the repository at this point in the history
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
ekohl committed Nov 9, 2023
1 parent 02c8e03 commit 334a00b
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 94 deletions.
82 changes: 82 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Adam Cécile <[email protected]>
Adam Cécile <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adam Růžička <[email protected]> <[email protected]>
Adi Abramovich <[email protected]>
Adi Abramovich <[email protected]> <[email protected]>
Alexander Olofsson <[email protected]>
Alexander Olofsson <[email protected]> Alexander Olofsson <[email protected]>
Amir Fefer <[email protected]>
Amir Fefer <[email protected]> <[email protected]>
Amit Karsale <[email protected]> <[email protected]>
Amit Upadhye <[email protected]> <[email protected]>
Andrew Dewar <[email protected]>
Andrew Kofink <[email protected]> <[email protected]>
Archana Kumari <[email protected]>
Arend Lapere <[email protected]> <[email protected]>
Avi Sharvit <[email protected]> <[email protected]>
Bernhard Suttner <[email protected]> <[email protected]>
Bernhard Suttner <[email protected]> <[email protected]>
Boaz Shuster <[email protected]>
Boaz Shuster <[email protected]> <[email protected]>
Boaz Shuster <[email protected]> <[email protected]>
Boaz Shuster <[email protected]> <[email protected]>
Boaz Shuster <[email protected]> <[email protected]>
Daniel Lobato García <[email protected]>
Daniel Lobato García <[email protected]> <[email protected]>
Dirk Götz <[email protected]>
Dominik Hlavac Duran <[email protected]>
Dominik Hlavac Duran <[email protected]> <[email protected]>
Dominik Hlavac Duran <[email protected]> <[email protected]>
Dominik Matoulek <[email protected]> <[email protected]>
Eric Helms <[email protected]> <[email protected]>
Eric Helms <[email protected]> Eric D. Helms <[email protected]>
Girija Soni <[email protected]>
Ian Ballou <[email protected]>
Imri Zvik <[email protected]>
Ivan Nečas <[email protected]>
Ivan Nečas <[email protected]> <[email protected]>
Joseph Magen <[email protected]>
Joseph Magen <[email protected]> <[email protected]>
Kamil Szubrycht <[email protected]>
Karolina Malyjurkova <[email protected]> <[email protected]>
Leos Stejskal <[email protected]> <[email protected]>
Lukáš Zapletal <[email protected]>
Lukáš Zapletal <[email protected]> <[email protected]>
Lukáš Zapletal <[email protected]> <[email protected]>
Marcel Kühlhorn <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Marek Hulán <[email protected]> <[email protected]>
Maria Agaphontzev <[email protected]>
Maria Agaphontzev <[email protected]> <[email protected]>
Maria Agaphontzev <[email protected]> <[email protected]>
Maria Nita <[email protected]>
Martin Bačovský <[email protected]> <[email protected]>
Martin Matuska <[email protected]> <[email protected]>
Matan Werbner <[email protected]>
Matan Werbner <[email protected]> <[email protected]>
Matan Werbner <[email protected]> <[email protected]>
Matan Werbner <[email protected]> <[email protected]>
Matan Werbner <[email protected]> <[email protected]>
Mirek Długosz <[email protected]>
Nadja Heitmann <[email protected]> <[email protected]>
Nofar Alfassi <[email protected]>
Nofar Alfassi <[email protected]> <[email protected]>
Ondřej Ezr <[email protected]>
Ondřej Ezr <[email protected]> <[email protected]>
Ondřej Pražák <[email protected]>
Ondřej Pražák <[email protected]> <[email protected]>
Ori Rabin <[email protected]>
Ori Rabin <[email protected]> <[email protected]>
Peter Koprda <[email protected]>
Peter Koprda <[email protected]> <[email protected]>
Peter Koprda <[email protected]> <[email protected]>
Sean O'Keeffe <[email protected]>
Shimon Shtein <[email protected]> <[email protected]>
Till Adam <[email protected]>
Vijaykumar Sawant <[email protected]>
Yifat Makias <[email protected]> <[email protected]>
Yifat Makias <[email protected]> <[email protected]>
Štefan Németh <snemeth@dynamic-2a00-1028-83a6-3cba-0eb1-2bbc-4b42-8938.ipv6.o2.cz>
98 changes: 4 additions & 94 deletions scripts/committers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand All @@ -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
Expand Down

0 comments on commit 334a00b

Please sign in to comment.