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

Method get_git_blob

github/Repository.py:3024–3033  ·  view source on GitHub ↗

:calls: `GET /repos/{owner}/{repo}/git/blobs/{file_sha} `_ :param sha: string :rtype: :class:`github.GitBlob.GitBlob`

(self, sha: str)

Source from the content-addressed store, hash-verified

3022 return Repository(self._requester, headers, data, completed=True)
3023
3024 def get_git_blob(self, sha: str) -> GitBlob:
3025 """
3026 :calls: `GET /repos/{owner}/{repo}/git/blobs/{file_sha} <https://docs.github.com/en/rest/reference/git#blobs>`_
3027 :param sha: string
3028 :rtype: :class:`github.GitBlob.GitBlob`
3029 """
3030 assert isinstance(sha, str), sha
3031 sha = urllib.parse.quote(sha, safe="")
3032 headers, data = self._requester.requestJsonAndCheck("GET", f"{self.url}/git/blobs/{sha}")
3033 return github.GitBlob.GitBlob(self._requester, headers, data, completed=True)
3034
3035 def get_git_commit(self, sha: str) -> GitCommit:
3036 """

Callers 2

testAllClassesMethod · 0.80
setUpMethod · 0.80

Calls 1

requestJsonAndCheckMethod · 0.80

Tested by

no test coverage detected