create_branch
Create a new branch in a repository, forking from an existing branch or the default branch. Returns the branch object, or fails if the branch name already exists.
Instructions
Create a new branch in a repository.
Returns the created Gitea Branch object. Fails cleanly via
:class:GiteaAPIError if the new branch name already exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner | |
| repo | Yes | Repository name | |
| new_branch_name | Yes | Name for the new branch (must not already exist) | |
| old_branch_name | No | Existing branch to fork from. Omit to use the repository's default branch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||