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 and their related data. Specifically, the "Get All Comments" operation for the "Pull Request" resource retrieves all comments associated with a specified pull request in a given project repository.

Use cases include:

  • Reviewing all discussion comments on a pull request to understand feedback or decisions.
  • Automating reporting or notifications based on pull request discussions.
  • Integrating pull request comments into other tools or workflows for enhanced collaboration.

Example: Fetching all comments from a pull request to display them in a custom dashboard or to trigger alerts when new comments are added.

Properties

Name Meaning
Authentication Method of authentication to use: "Personal Access Token" or "Basic Auth".
Project The key of the project containing the repository and pull request.
Pull Request ID The numeric ID of the pull request whose comments you want to retrieve.

Output

The output is a JSON array where each element represents a comment on the specified pull request. Each comment object contains details as returned by the Bitbucket Data Center API, typically including:

  • Comment text content.
  • Author information.
  • Creation and update timestamps.
  • Comment ID and possibly metadata about replies or edits.

No binary data output is involved in this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires credentials configured in n8n for either Personal Access Token or Basic Authentication.
  • The node uses the Bitbucket Data Center REST API endpoints under /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments.

Troubleshooting

  • Common issues:

    • Incorrect project key or pull request ID will result in API errors or empty results.
    • Insufficient permissions for the provided credentials may cause authorization failures.
    • Network connectivity issues to the Bitbucket server can cause request failures.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates an issue with the API call; check credentials, URL, and parameters.
    • "The operation "getAllComments" is not supported for resource "pullRequest" would indicate a misconfiguration or unsupported operation (unlikely here since it is supported).
  • Resolutions:

    • Verify that the project key and pull request ID are correct.
    • Ensure the API credentials have appropriate permissions to read pull request comments.
    • Confirm network access to the Bitbucket Data Center server.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.

Links and References

Discussion