MCPcopy Create free account
hub / github.com/bazelbuild/bazel / get_external_authors_between

Function get_external_authors_between

scripts/release/relnotes.py:143–163  ·  view source on GitHub ↗

Gets all external authors for commits between `base` and `head`.

(base, head)

Source from the content-addressed store, hash-verified

141
142
143def 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
166def get_filtered_notes(base, previous_release, is_patch_release):

Callers 1

relnotes.pyFile · 0.85

Calls 7

gitFunction · 0.85
rstripMethod · 0.80
partitionMethod · 0.80
splitMethod · 0.80
appendMethod · 0.45
joinMethod · 0.45
unionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…