Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

This node interacts with the Bitbucket Data Center API to manage pull requests within a specified project and repository. Specifically, the "Get All" operation for the "Pull Request" resource retrieves multiple pull requests from a given repository in a project. This is useful for scenarios where you want to list or analyze all pull requests, such as monitoring code review status, generating reports, or automating workflows based on pull request data.

Practical examples include:

  • Fetching all open pull requests to trigger notifications.
  • Aggregating pull request data for analytics dashboards.
  • Automating merges or reviews based on pull request metadata.

Properties

Name Meaning
Authentication Method of authentication: "Personal Access Token" or "Basic Auth".
Project The key of the project containing the repository to work with.
Return All Whether to return all pull requests or limit the number of results.
Limit Maximum number of pull requests to return (applicable if "Return All" is false).

Output

The output is a JSON array where each element represents a pull request object retrieved from the Bitbucket Data Center API. Each pull request object contains detailed information about the pull request, such as its ID, title, source and destination branches, author, reviewers, status, and other metadata provided by the API.

No binary data output is produced by this operation.

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/projects/{projectKey}/repos/{repositorySlug}/pull-requests.

Troubleshooting

  • Authentication errors: Ensure that the API credentials (personal access token or basic auth) are correctly configured and have sufficient permissions to read pull requests.
  • Project or repository not found: Verify that the selected project key and repository slug exist and are accessible with the provided credentials.
  • Limit and pagination: If "Return All" is false and the limit is set too low, you may receive fewer pull requests than expected. Set "Return All" to true to fetch all available pull requests.
  • API request failures: Network issues or API rate limits can cause errors. Check connectivity and API usage policies.
  • Error messages: Errors thrown by the node will typically indicate the failed API request and include the error message returned by Bitbucket Data Center.

Links and References

Discussion