Skip to content

Commit d3e5485

Browse files
DOC: Fixed contributors for bugfix releases (#32827)
* DOC: Fixed contributors for bugfix releases
1 parent bbfecaf commit d3e5485

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

doc/sphinxext/announce.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,21 @@ def get_authors(revision_range):
6868
revision_range = f"{lst_release}..{cur_release}"
6969

7070
# authors, in current release and previous to current release.
71-
cur = set(re.findall(pat, this_repo.git.shortlog("-s", revision_range), re.M))
72-
pre = set(re.findall(pat, this_repo.git.shortlog("-s", lst_release), re.M))
71+
# We need two passes over the log for cur and prev, one to get the
72+
# "Co-authored by" commits, which come from backports by the bot,
73+
# and one for regular commits.
74+
xpr = re.compile(r"Co-authored-by: (?P<name>[^<]+) ")
75+
cur = set(
76+
xpr.findall(
77+
this_repo.git.log("--grep=Co-authored", "--pretty=%b", revision_range)
78+
)
79+
)
80+
cur |= set(re.findall(pat, this_repo.git.shortlog("-s", revision_range), re.M))
81+
82+
pre = set(
83+
xpr.findall(this_repo.git.log("--grep=Co-authored", "--pretty=%b", lst_release))
84+
)
85+
pre |= set(re.findall(pat, this_repo.git.shortlog("-s", lst_release), re.M))
7386

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

0 commit comments

Comments
 (0)