Gets all external authors for commits between `base` and `head`.
(base, head)
| 141 | |
| 142 | |
| 143 | def get_external_authors_between(base, head): |
| 144 | """Gets all external authors for commits between `base` and `head`.""" |
| 145 | |
| 146 | # Get all authors |
| 147 | authors = git("log", f"{base}..{head}", "--format=%aN|%aE") |
| 148 | authors = set( |
| 149 | author.partition("|")[0].rstrip() |
| 150 | for author in authors if not (author.endswith(("@google.com")))) |
| 151 | |
| 152 | # Get all co-authors |
| 153 | contributors = git( |
| 154 | "log", f"{base}..{head}", "--format=%(trailers:key=Co-authored-by)" |
| 155 | ) |
| 156 | |
| 157 | coauthors = [] |
| 158 | for coauthor in contributors: |
| 159 | if coauthor and not re.search("@google.com", coauthor): |
| 160 | coauthors.append( |
| 161 | " ".join(re.sub(r"Co-authored-by: |<.*?>", "", coauthor).split()) |
| 162 | ) |
| 163 | return ", ".join(sorted(authors.union(coauthors), key=str.casefold)) |
| 164 | |
| 165 | |
| 166 | def get_filtered_notes(base, previous_release, is_patch_release): |