From 7887265cd959b49a5a1ee95f3d8abac6d72512c0 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Thu, 19 Mar 2020 09:28:59 -0500 Subject: [PATCH 1/2] DOC: Fixed contributors for bugfix releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we showed just contributors who manually backported commits to the maintenance branch. ``` Contributors ============ A total of 8 people contributed patches to this release. People with a "+" by their names contributed a patch for the first time. * Daniel Saxton * Joris Van den Bossche * MeeseeksMachine * MomIsBestFriend * Pandas Development Team * Simon Hawkins * Tom Augspurger * jbrockmendel ``` Fixed ``` Contributors ============ A total of 22 people contributed patches to this release. People with a "+" by their names contributed a patch for the first time. * Anna Daglis + * Daniel Saxton * Irv Lustig * Jan Škoda + * Joris Van den Bossche * Justin Zheng + * Kaiqi Dong * Kendall Masse + * Marco Gorelli * Matthew Roeschke + * Pedro Reys + * Prakhar Pandey + * Robert de Vries + * Rushabh Vasani + * Simon Hawkins + * Stijn Van Hoey + * Terji Petersen + * Tom Augspurger * William Ayd * alimcmaster1 * gfyoung + * jbrockmendel ``` --- doc/sphinxext/announce.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/sphinxext/announce.py b/doc/sphinxext/announce.py index 0084036f1e75c..ade7ad7a5459e 100755 --- a/doc/sphinxext/announce.py +++ b/doc/sphinxext/announce.py @@ -68,8 +68,15 @@ 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)) + xpr = re.compile(r"Co-authored-by: (?P[^<]+) ") + cur = set( + xpr.findall( + this_repo.git.log("--grep=Co-authored", "--pretty=%b", revision_range) + ) + ) + pre = set( + xpr.findall(this_repo.git.log("--grep=Co-authored", "--pretty=%b", lst_release)) + ) # Homu is the author of auto merges, clean him out. cur.discard("Homu") From d14eef4cd53407e7b3aa7bd54d6d88c24f6b43de Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Thu, 19 Mar 2020 09:38:41 -0500 Subject: [PATCH 2/2] two passes --- doc/sphinxext/announce.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/sphinxext/announce.py b/doc/sphinxext/announce.py index ade7ad7a5459e..9c175e4e58b45 100755 --- a/doc/sphinxext/announce.py +++ b/doc/sphinxext/announce.py @@ -68,15 +68,21 @@ def get_authors(revision_range): revision_range = f"{lst_release}..{cur_release}" # authors, in current release and previous to current release. + # 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[^<]+) ") 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")