MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / get_git_commit

Method get_git_commit

github/Repository.py:3035–3044  ·  view source on GitHub ↗

:calls: `GET /repos/{owner}/{repo}/git/commits/{commit_sha} `_ :param sha: string :rtype: :class:`github.GitCommit.GitCommit`

(self, sha: str)

Source from the content-addressed store, hash-verified

3033 return github.GitBlob.GitBlob(self._requester, headers, data, completed=True)
3034
3035 def get_git_commit(self, sha: str) -> GitCommit:
3036 """
3037 :calls: `GET /repos/{owner}/{repo}/git/commits/{commit_sha} <https://docs.github.com/en/rest/reference/git#commits>`_
3038 :param sha: string
3039 :rtype: :class:`github.GitCommit.GitCommit`
3040 """
3041 assert isinstance(sha, str), sha
3042 sha = urllib.parse.quote(sha, safe="")
3043 headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/git/commits/{sha}")
3044 return github.GitCommit.GitCommit(self._requester, headers, data, completed=True)
3045
3046 def get_git_ref(self, ref: str) -> GitRef:
3047 """

Callers 4

testAllClassesMethod · 0.80
setUpMethod · 0.80
testConversionMethod · 0.80

Calls 1

requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected