Skip to content

DOC: Fixed contributors for bugfix releases #32827

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 3 commits into from
Mar 23, 2020
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
17 changes: 15 additions & 2 deletions doc/sphinxext/announce.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,21 @@ def get_authors(revision_range):
revision_range = f"{lst_release}..{cur_release}"

# authors, in current release and previous to current release.
cur = set(re.findall(pat, this_repo.git.shortlog("-s", revision_range), re.M))
pre = set(re.findall(pat, this_repo.git.shortlog("-s", lst_release), re.M))
# We need two passes over the log for cur and prev, one to get the
# "Co-authored by" commits, which come from backports by the bot,
# and one for regular commits.
xpr = re.compile(r"Co-authored-by: (?P<name>[^<]+) ")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be responsible for some issues here; I typically clear out all commit messages before squashing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we'll want to keep it here for backports (GitHub also uses the message I think).

Shouldn't matter for regular PRs, since they use the regular author field, not the message.

cur = set(
xpr.findall(
this_repo.git.log("--grep=Co-authored", "--pretty=%b", revision_range)
)
)
cur |= set(re.findall(pat, this_repo.git.shortlog("-s", revision_range), re.M))

pre = set(
xpr.findall(this_repo.git.log("--grep=Co-authored", "--pretty=%b", lst_release))
)
pre |= set(re.findall(pat, this_repo.git.shortlog("-s", lst_release), re.M))

# Homu is the author of auto merges, clean him out.
cur.discard("Homu")
Expand Down