[Git][reproducible-builds/reproducible-website][master] dedup by email to avoid listing some contributors twice

Chris Lamb (@lamby) gitlab at salsa.debian.org
Tue Nov 8 06:33:14 UTC 2022



Chris Lamb pushed to branch master at Reproducible Builds / reproducible-website


Commits:
fed37547 by FC Stegerman at 2022-11-08T02:40:20+01:00
dedup by email to avoid listing some contributors twice

- - - - -


1 changed file:

- bin/contributors.py


Changes:

=====================================
bin/contributors.py
=====================================
@@ -68,13 +68,22 @@ NICKNAMES = {
 
 
 def get_git_authors():
-    output = subprocess.check_output(("git", "log", "--format=%aN"))
+    output = subprocess.check_output(("git", "log", "--format=%aN|%aE"))
+    authors = set()
+    emails = set()
 
-    return {x for x in output.decode("utf-8").split("\n") if x}
+    for line in output.decode("utf-8").split("\n"):
+        if line:
+            name, email = line.rsplit("|", 1)
+            if email not in emails:
+                emails.add(email)
+                authors.add(name)
+
+    return authors
 
 
 def main():
-    data = set(get_git_authors())
+    data = get_git_authors()
     data.update(EXTRA)
 
     for x, y in NICKNAMES:



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/fed375470bf8a4ce9b7f2afe1c386b126ecefe80

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/fed375470bf8a4ce9b7f2afe1c386b126ecefe80
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20221108/5c561ad6/attachment.htm>


More information about the rb-commits mailing list