Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

The node integrates with Bitbucket Data Center API to manage pull requests and their comments within a specified project repository. Specifically, the "Update Comment" operation allows users to modify the text content of an existing comment on a pull request.

This node is beneficial in automation workflows where you want to programmatically update feedback or notes on pull requests without manually accessing the Bitbucket UI. For example, it can be used to automatically update review comments based on CI/CD pipeline results or bot-generated analysis.

Properties

Name Meaning
Authentication Method of authentication: either "Personal Access Token" or "Basic Auth".
Project The key of the Bitbucket project containing the repository and pull request.
Pull Request ID The numeric ID of the pull request where the comment exists.
Comment ID The numeric ID of the comment to update.
Comment Text The new text content to replace the existing comment's content.

Output

The output JSON contains the updated comment object as returned by the Bitbucket Data Center API after successfully updating the comment. This typically includes fields such as the comment ID, updated text, author information, timestamps, and possibly links related to the comment.

If the update fails, the node throws an error unless configured to continue on failure, in which case the output will contain an error message.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires credentials for authentication, either a personal access token or basic authentication (username/password).
  • The node expects the Bitbucket server URL to be configured in the credentials.
  • Uses Bitbucket REST API endpoints under /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}.

Troubleshooting

  • Common Issues:

    • Incorrect project key, repository slug, pull request ID, or comment ID will cause the API call to fail.
    • Insufficient permissions for the authenticated user to update comments.
    • Network connectivity issues to the Bitbucket Data Center server.
    • Using invalid or expired authentication tokens.
  • Error Messages:

    • "Bitbucket Data Center API request failed: ..." indicates a problem with the API call; check credentials and parameters.
    • "The operation "updateComment" is not supported for resource "pullRequest" would indicate a misconfiguration but is unlikely here since this operation is supported.
    • "Unknown error" may indicate unexpected failures; verify server availability and API endpoint correctness.
  • Resolution Tips:

    • Verify all IDs and keys are correct and exist in Bitbucket.
    • Ensure the API credentials have sufficient rights to edit pull request comments.
    • Check network access and firewall settings.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch operations.

Links and References

Discussion