Add Repository.rename_branch method (#2089)

The GitHub API exposes an endpoint to rename a branch, so we should
support calling it. Sadly, there is not enough information to add
that method to the Branch class, so expose it in the Repository object.

Fixes #1901
This commit is contained in:
Steve Kowalik
2021-10-24 15:21:31 +11:00
committed by GitHub
parent c8a945bb42
commit 6452ddfeb4
5 changed files with 64 additions and 0 deletions
+3
View File
@@ -307,6 +307,9 @@ class Repository(CompletableGithubObject):
) -> str: ...
def get_assignees(self) -> PaginatedList[NamedUser]: ...
def get_branch(self, branch: str) -> Branch: ...
def rename_branch(
self, branch: Union[str, Branch], new_name: str
) -> bool: ...
def get_branches(self) -> PaginatedList[Branch]: ...
def get_check_run(self, check_run_id: int) -> CheckRun: ...
def get_check_suite(self, check_suite_id: int) -> CheckSuite: ...