MCPcopy Create free account
hub / github.com/comaps/comaps / gh_api

Function gh_api

tools/python/cherry_picking_issue.py:23–31  ·  view source on GitHub ↗
(endpoint, jq=None)

Source from the content-addressed store, hash-verified

21
22
23def gh_api(endpoint, jq=None):
24 cmd = ["gh", "api", endpoint]
25 if jq:
26 cmd += ["--jq", jq]
27 try:
28 result = subprocess.run(cmd, capture_output=True, text=True, timeout=10)
29 return result.stdout.strip() if result.returncode == 0 else ""
30 except (subprocess.TimeoutExpired, FileNotFoundError):
31 return ""
32
33
34def get_pr_number(commit_hash):

Callers 2

get_pr_numberFunction · 0.85
get_pr_infoFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected