:calls: `GET /repos/{owner}/{repo}/git/ref/{ref} `_ :param ref: string :rtype: :class:`github.GitRef.GitRef`
(self, ref: str)
| 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 | """ |
no outgoing calls
no test coverage detected