MCPcopy Index your code
hub / github.com/plotly/plotly.py / get_latest_commit_info

Function get_latest_commit_info

commands.py:161–174  ·  view source on GitHub ↗

Get latest commit info from GitHub API.

(repo, branch)

Source from the content-addressed store, hash-verified

159
160
161def get_latest_commit_info(repo, branch):
162 """Get latest commit info from GitHub API."""
163
164 url = "https://api.github.com/repos/{repo}/commits/{branch}".format(
165 repo=repo, branch=branch
166 )
167 req = requests.get(url)
168 assert req.status_code == 200, "Failed to fetch commit info: %s" % req.text
169 commit = req.json()
170
171 return {
172 "vcs_revision": commit["sha"],
173 "committer_date": commit["commit"]["committer"]["date"],
174 }
175
176
177def get_bundle_schema_local(local):

Callers 1

Calls 2

formatMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected