:calls: `GET /repos/{owner}/{repo}/git/trees/{tree_sha} `_ :param sha: string :param recursive: bool :rtype: :class:`github.GitTree.GitTree`
(self, sha: str, recursive: Opt[bool] = NotSet)
| 3090 | return github.GitTag.GitTag(self._requester, headers, data, completed=True) |
| 3091 | |
| 3092 | def get_git_tree(self, sha: str, recursive: Opt[bool] = NotSet) -> GitTree: |
| 3093 | """ |
| 3094 | :calls: `GET /repos/{owner}/{repo}/git/trees/{tree_sha} <https://docs.github.com/en/rest/reference/git#trees>`_ |
| 3095 | :param sha: string |
| 3096 | :param recursive: bool |
| 3097 | :rtype: :class:`github.GitTree.GitTree` |
| 3098 | """ |
| 3099 | assert isinstance(sha, str), sha |
| 3100 | assert is_optional(recursive, bool), recursive |
| 3101 | sha = urllib.parse.quote(sha, safe="") |
| 3102 | url_parameters = dict() |
| 3103 | if is_defined(recursive) and recursive: |
| 3104 | # GitHub API requires the recursive parameter be set to 1. |
| 3105 | url_parameters["recursive"] = 1 |
| 3106 | headers, data = self._requester.requestJsonAndCheck( |
| 3107 | "GET", f"{self.url}/git/trees/{sha}", parameters=url_parameters |
| 3108 | ) |
| 3109 | return github.GitTree.GitTree(self._requester, headers, data, completed=True) |
| 3110 | |
| 3111 | def get_hook(self, id: int) -> Hook: |
| 3112 | """ |
no test coverage detected