File tree 1 file changed +15
-2
lines changed
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):
68
68
revision_range = f"{ lst_release } ..{ cur_release } "
69
69
70
70
# 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 ))
73
86
74
87
# Homu is the author of auto merges, clean him out.
75
88
cur .discard ("Homu" )
You can’t perform that action at this time.
0 commit comments