Skip to content

Commit 4567d6b

Browse files
Backport PR #52138 on branch 2.0.x (DOC update contributors) (#52631)
Backport PR #52138: DOC update contributors Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent 5cdf5f3 commit 4567d6b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/sphinxext/announce.py

+14
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939

4040
from git import Repo
4141

42+
# Contributors to be renamed.
43+
CONTRIBUTOR_MAPPING = {"znkjnffrezna": "znetbgcubravk"}
44+
4245
UTF8Writer = codecs.getwriter("utf8")
4346
this_repo = Repo(os.path.join(os.path.dirname(__file__), "..", ".."))
4447

@@ -87,6 +90,17 @@ def get_authors(revision_range):
8790
cur.discard("Homu")
8891
pre.discard("Homu")
8992

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+
90104
# Append '+' to new authors.
91105
authors = [s + " +" for s in cur - pre] + list(cur & pre)
92106
authors.sort()

0 commit comments

Comments
 (0)