File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments