Skip to content

DOC update contributors #52138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/sphinxext/announce.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@

from git import Repo

# Contributors to be renamed.
CONTRIBUTOR_MAPPING = {"znkjnffrezna": "znetbgcubravk"}

UTF8Writer = codecs.getwriter("utf8")
this_repo = Repo(os.path.join(os.path.dirname(__file__), "..", ".."))

Expand Down Expand Up @@ -87,6 +90,17 @@ def get_authors(revision_range):
cur.discard("Homu")
pre.discard("Homu")

# Rename contributors according to mapping.
for old_name, new_name in CONTRIBUTOR_MAPPING.items():
old_name_decoded = codecs.decode(old_name, "rot13")
new_name_decoded = codecs.decode(new_name, "rot13")
if old_name_decoded in pre:
pre.discard(old_name_decoded)
pre.add(new_name_decoded)
if old_name_decoded in cur:
cur.discard(old_name_decoded)
cur.add(new_name_decoded)

# Append '+' to new authors.
authors = [s + " +" for s in cur - pre] + list(cur & pre)
authors.sort()
Expand Down