bb_add_branch
Creates a new branch in a Bitbucket repository using workspace slug, repository slug, branch name, and source branch or commit hash. Requires repository write permissions and returns a success message upon completion.
Instructions
Creates a new branch in a specified Bitbucket repository. Requires the workspace slug (workspaceSlug
), repository slug (repoSlug
), the desired new branch name (newBranchName
), and the source branch or commit hash (sourceBranchOrCommit
) to branch from. Requires repository write permissions. Returns a success message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
newBranchName | Yes | The name for the new branch. | |
repoSlug | Yes | Repository slug where the branch will be created. | |
sourceBranchOrCommit | Yes | The name of the branch or the commit hash to branch from. | |
workspaceSlug | No | Workspace slug containing the repository. If not provided, the system will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account). Example: "myteam" |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"newBranchName": {
"description": "The name for the new branch.",
"minLength": 1,
"type": "string"
},
"repoSlug": {
"description": "Repository slug where the branch will be created.",
"minLength": 1,
"type": "string"
},
"sourceBranchOrCommit": {
"description": "The name of the branch or the commit hash to branch from.",
"minLength": 1,
"type": "string"
},
"workspaceSlug": {
"description": "Workspace slug containing the repository. If not provided, the system will use your default workspace (either configured via BITBUCKET_DEFAULT_WORKSPACE or the first workspace in your account). Example: \"myteam\"",
"type": "string"
}
},
"required": [
"repoSlug",
"newBranchName",
"sourceBranchOrCommit"
],
"type": "object"
}