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

Method create_bucket

tools/lib/github_utils.py:56–62  ·  view source on GitHub ↗
(self, bucket)

Source from the content-addressed store, hash-verified

54 self.upload_file(bucket, path, file_name)
55
56 def create_bucket(self, bucket):
57 if self.get_bucket_sha(bucket):
58 return
59 master_sha = self.get_bucket_sha('master')
60 github_path = "git/refs"
61 data = f'{{"ref":"refs/heads/{bucket}", "sha":"{master_sha}"}}'
62 self.api_call(github_path, data=data, method=HTTPMethod.POST, data_call=True)
63
64 def get_bucket_sha(self, bucket):
65 github_path = f"git/ref/heads/{bucket}"

Callers 1

upload_filesMethod · 0.95

Calls 2

get_bucket_shaMethod · 0.95
api_callMethod · 0.95

Tested by

no test coverage detected