MCPcopy Create free account
hub / github.com/apache/tvm / find_reviewers

Function find_reviewers

ci/scripts/github/github_cc_reviewers.py:35–49  ·  view source on GitHub ↗
(body: str)

Source from the content-addressed store, hash-verified

33
34
35def find_reviewers(body: str) -> list[str]:
36 print(f"Parsing body:\n{body}")
37 matches = re.findall(r"(cc( @[-A-Za-z0-9]+)+)", body, flags=re.MULTILINE)
38 matches = [full for full, last in matches]
39
40 print("Found matches:", matches)
41 reviewers = []
42 for match in matches:
43 if match.startswith("cc "):
44 match = match.replace("cc ", "")
45 users = [x.strip() for x in match.split("@")]
46 reviewers += users
47
48 reviewers = set(x for x in reviewers if x != "")
49 return sorted(list(reviewers))
50
51
52if __name__ == "__main__":

Callers 1

Calls 3

printFunction · 0.85
replaceMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…