File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 39
39
40
40
from git import Repo
41
41
42
+ # Contributors to be renamed.
43
+ CONTRIBUTOR_MAPPING = {"znkjnffrezna" : "znetbgcubravk" }
44
+
42
45
UTF8Writer = codecs .getwriter ("utf8" )
43
46
this_repo = Repo (os .path .join (os .path .dirname (__file__ ), ".." , ".." ))
44
47
@@ -87,6 +90,17 @@ def get_authors(revision_range):
87
90
cur .discard ("Homu" )
88
91
pre .discard ("Homu" )
89
92
93
+ # Rename contributors according to mapping.
94
+ for old_name , new_name in CONTRIBUTOR_MAPPING .items ():
95
+ old_name_decoded = codecs .decode (old_name , "rot13" )
96
+ new_name_decoded = codecs .decode (new_name , "rot13" )
97
+ if old_name_decoded in pre :
98
+ pre .discard (old_name_decoded )
99
+ pre .add (new_name_decoded )
100
+ if old_name_decoded in cur :
101
+ cur .discard (old_name_decoded )
102
+ cur .add (new_name_decoded )
103
+
90
104
# Append '+' to new authors.
91
105
authors = [s + " +" for s in cur - pre ] + list (cur & pre )
92
106
authors .sort ()
You can’t perform that action at this time.
0 commit comments