Update Repository Settings
Change the default branch of the repository identified by the JWT repo claim.
The gateway reads the current HEAD symbolic ref, then repoints it at the requested branch through a transactional compare-and-swap against that value, and finally records the new default branch in the repository row. Branch names are fully qualified for you: main is written as the symref target refs/heads/main, and a value that already starts with refs/ is used verbatim. The branch itself is not created by this call.
JWT claims
Required scopes: repo:write
Requires per repo scope: Yes
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.
Body
Repository settings to change. default_branch is the only supported field and must be a non-empty branch name.
Repository settings to patch, such as the default branch.
New default branch name for the Code Storage repository.
"main"
Response
Default branch updated. Returns the repository ID, its URL path, and the branch name now recorded as the default.