Actions50
- Branch Actions
- Commit Actions
- Issue Actions
- Project Actions
- Pull Request Actions
- Repository Actions
- Tag Actions
- File Actions
- User Actions
- Webhook Actions
Overview
This node interacts with the Bitbucket Data Center API to manage pull requests within a specified project and repository. Specifically, the "Create" operation for the "Pull Request" resource allows users to create new pull requests by specifying source and destination branches along with a title and optional description.
Common scenarios where this node is beneficial include automating code review workflows, integrating pull request creation into CI/CD pipelines, or managing development processes programmatically without manual intervention in the Bitbucket UI.
For example, a developer can use this node to automatically open a pull request from a feature branch to the main branch after pushing changes, streamlining collaboration and code integration.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: "Personal Access Token" or "Basic Auth". |
| Project | The key of the Bitbucket project containing the repository. |
| Title | The title of the pull request to be created. |
| From Branch | The source branch name from which the pull request originates (e.g., "feature-branch"). |
| To Branch | The destination branch name to which the pull request will be merged (default: "main"). |
| Description | Optional detailed description of the pull request. |
Output
The output JSON contains the response from the Bitbucket Data Center API representing the created pull request. This typically includes details such as:
- Pull request ID
- Title
- Description
- Source and destination branch references
- Author information
- Status and state of the pull request
- Links to the pull request in Bitbucket UI
If multiple pull requests are created in batch mode, the output will be an array of such objects.
The node does not output binary data.
Dependencies
- Requires access to a Bitbucket Data Center instance.
- Requires either a Personal Access Token or Basic Authentication credentials configured in n8n.
- The node uses the Bitbucket Data Center REST API endpoints under
/rest/api/1.0/. - Proper permissions on the Bitbucket project and repository to create pull requests are necessary.
Troubleshooting
- Authentication errors: Ensure that the provided Personal Access Token or Basic Auth credentials have sufficient permissions and are correctly configured in n8n.
- Invalid project or repository: Verify that the selected project key and repository slug exist and are accessible.
- Branch not found: The source (
fromRef) and destination (toRef) branches must exist in the repository; otherwise, the API will return an error. - API request failures: Network issues or incorrect server URLs can cause request failures. Check connectivity and server configuration.
- Error messages: Errors from the Bitbucket API are wrapped and presented as
Bitbucket Data Center API request failed: <message>. Review the message for specific causes.
To resolve issues, verify all input parameters, credentials, and network access.