Skip to content

Support renaming the current default branch to the new name

Currently, when updating the default branch setting of a repo, the new branch must exist for the operation to succeed. Doing it via the Web UI will actually rename the current default branch to the new name.

We should add support to that also via otterdog, utilizing the api for renaming a branch: https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#rename-a-branch

We could add an additional model only field to enable renaming otherwise, just the default branch setting is updating without renaming.