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

Function prs_query

ci/scripts/github/ping_reviewers.py:37–85  ·  view source on GitHub ↗
(user: str, repo: str, cursor: str | None = None)

Source from the content-addressed store, hash-verified

35
36
37def prs_query(user: str, repo: str, cursor: str | None = None):
38 after = ""
39 if cursor is not None:
40 after = f', before:"{cursor}"'
41 time_keys = "createdAt updatedAt lastEditedAt publishedAt"
42 return f"""
43 {{
44 repository(name: "{repo}", owner: "{user}") {{
45 pullRequests(states: [OPEN], last: 10{after}) {{
46 edges {{
47 cursor
48 }}
49 nodes {{
50 number
51 url
52 body
53 {time_keys}
54 isDraft
55 author {{
56 login
57 }}
58 reviews(last:100) {{
59 nodes {{
60 {time_keys}
61 bodyText
62 author {{ login }}
63 comments(last:100) {{
64 nodes {{
65 {time_keys}
66 bodyText
67 }}
68 }}
69 }}
70 }}
71 comments(last:100) {{
72 nodes {{
73 authorAssociation
74 bodyText
75 {time_keys}
76 author {{
77 login
78 }}
79 }}
80 }}
81 }}
82 }}
83 }}
84 }}
85 """
86
87
88def find_reviewers(body: str) -> list[str]:

Callers 1

ping_reviewers.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…