Actions29
Overview
This node interacts with the Bitbucket Data Center API to manage branches within repositories. Specifically, the "Branch: Create" operation allows users to create a new branch in a specified repository and project. This is useful for automating version control workflows, such as creating feature branches or hotfixes programmatically.
Practical examples include:
- Automatically creating a new branch when a new feature request is received.
- Creating branches based on issue tracking or CI/CD pipeline triggers.
- Managing multiple branches across projects without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to use: either "Personal Access Token" or "Basic Auth". |
| Project | The key of the project containing the repository where the branch will be created. |
| Branch Name | The name of the new branch to create. |
| Start Point | The branch or commit hash from which the new branch will start (default is "main"). |
Output
The output JSON contains the response from the Bitbucket Data Center API representing the newly created branch. This typically includes details such as the branch name, start point, repository information, and metadata about the branch creation.
No binary data is output by this node.
Dependencies
- Requires access to a Bitbucket Data Center instance.
- Requires an API authentication credential configured in n8n, either a personal access token or basic authentication.
- The node uses Bitbucket Data Center REST API endpoints under
/rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches.
Troubleshooting
Common issues:
- Invalid project key or repository slug: Ensure the project and repository exist and are correctly selected.
- Insufficient permissions: The API credentials must have rights to create branches in the target repository.
- Incorrect start point: The start point must be a valid branch or commit hash; otherwise, the API will reject the request.
Error messages:
"Bitbucket Data Center API request failed: ..."indicates an issue with the API call, possibly due to network, authentication, or permission errors."The operation "create" is not supported for resource "branch"would indicate a misconfiguration but should not occur if using the node properly.
To resolve errors, verify credentials, project and repository selections, and that the start point exists in the repository.