Skip to content
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