MCPcopy
hub / github.com/commaai/openpilot / get_file_sha

Method get_file_sha

tools/lib/github_utils.py:74–77  ·  view source on GitHub ↗
(self, bucket, file_name)

Source from the content-addressed store, hash-verified

72 return r.json()['download_url']
73
74 def get_file_sha(self, bucket, file_name):
75 github_path = f"contents/{file_name}?ref={bucket}"
76 r = self.api_call(github_path, data_call=True, raise_on_failure=False)
77 return r.json()['sha'] if r.ok else None
78
79 def get_pr_number(self, pr_branch):
80 github_path = f"commits/{pr_branch}/pulls"

Callers 1

upload_fileMethod · 0.95

Calls 1

api_callMethod · 0.95

Tested by

no test coverage detected