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

Function commits_query

ci/scripts/github/update_branch.py:61–87  ·  view source on GitHub ↗

Create a GraphQL query to find the last N commits along with their statuses and some metadata (paginated after 'cursor')

(user: str, repo: str, cursor: str | None = None)

Source from the content-addressed store, hash-verified

59
60
61def commits_query(user: str, repo: str, cursor: str | None = None):
62 """
63 Create a GraphQL query to find the last N commits along with their statuses
64 and some metadata (paginated after 'cursor')
65 """
66 after = ""
67 if cursor is not None:
68 after = f', after:"{cursor}"'
69
70 return f"""
71 {{
72 repository(name: "{repo}", owner: "{user}") {{
73 defaultBranchRef {{
74 target {{
75 ... on Commit {{
76 history(first: 15{after}) {{
77 edges {{ cursor }}
78 nodes {{
79 {_commit_query_fields}
80 }}
81 }}
82 }}
83 }}
84 }}
85 }}
86 }}
87 """
88
89
90EXPECTED_CI_JOBS = [

Callers 1

update_branch.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…