pub async fn repos_slash_rename_branch(
configuration: &Configuration,
owner: &str,
repo: &str,
branch: &str,
repos_rename_branch_request: ReposRenameBranchRequest,
) -> Result<BranchWithProtection, Error<ReposSlashRenameBranchError>>
Expand description
Renames a branch in a repository. Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won’t be able to push to the old branch name while the rename process is in progress. For more information, see "Renaming a branch". The authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions. In order to rename the default branch, fine-grained access tokens also need the administration:write
repository permission.