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

Method get_git_ref

github/Repository.py:3046–3058  ·  view source on GitHub ↗

:calls: `GET /repos/{owner}/{repo}/git/ref/{ref} `_ :param ref: string :rtype: :class:`github.GitRef.GitRef`

(self, ref: str)

Source from the content-addressed store, hash-verified

3044 return github.GitCommit.GitCommit(self._requester, headers, data, completed=True)
3045
3046 def get_git_ref(self, ref: str) -> GitRef:
3047 """
3048 :calls: `GET /repos/{owner}/{repo}/git/ref/{ref} <https://docs.github.com/en/rest/git/refs#get-a-reference>`_
3049 :param ref: string
3050 :rtype: :class:`github.GitRef.GitRef`
3051 """
3052 prefix = "/git/ref/"
3053 if not self._requester.FIX_REPO_GET_GIT_REF:
3054 prefix = "/git/"
3055 assert isinstance(ref, str), ref
3056 quoted_ref = urllib.parse.quote(ref)
3057 url = f"{self.url}{prefix}{quoted_ref}"
3058 return github.GitRef.GitRef(self._requester, url=url, attributes={"ref": ref})
3059
3060 def get_git_refs(self) -> PaginatedList[GitRef]:
3061 """

Callers 6

delete_branchMethod · 0.80
testAllClassesMethod · 0.80
testGetGitRefMethod · 0.80
setUpMethod · 0.80
testLazyAttributesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected