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 integrates with the Bitbucket Data Center API to manage pull request comments, specifically allowing users to delete a comment on a pull request within a specified project and repository. It is useful in scenarios where automated workflows need to clean up or moderate comments on pull requests, such as removing outdated feedback, resolving discussions, or managing comment clutter programmatically.
For example, a user might automate the deletion of certain comments after a pull request is merged or closed, or remove comments that contain sensitive information accidentally posted.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: either "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 from which the comment will be deleted. |
| Comment ID | The numeric ID of the specific comment to delete on the pull request. |
Output
The output JSON contains a single field indicating success:
{
"success": true
}
This confirms that the comment was successfully deleted. If an error occurs, the node throws an error describing the failure.
No binary data is output by this operation.
Dependencies
- Requires access to a Bitbucket Data Center instance.
- Requires credentials for authentication, either a personal access token or basic authentication credentials.
- The node uses the Bitbucket Data Center REST API endpoint
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}with the HTTP DELETE method. - Proper permissions are required on the Bitbucket server to delete pull request comments.
Troubleshooting
Common issues:
- Invalid or missing project key, repository slug, pull request ID, or comment ID will cause the API call to fail.
- Insufficient permissions to delete comments may result in authorization errors.
- Network connectivity or incorrect server URL configuration can cause request failures.
Error messages:
Bitbucket Data Center API request failed: ...indicates an issue with the API call; check credentials, permissions, and parameters.The operation "deleteComment" is not supported for resource "pullRequest"would indicate a misconfiguration or unsupported operation (unlikely here since it is supported).
Resolution tips:
- Verify all IDs and keys are correct and correspond to existing entities.
- Ensure the API credentials have sufficient rights to delete comments.
- Confirm the Bitbucket server URL is correctly configured in the credentials.
- Enable "Continue On Fail" in the node settings if you want the workflow to proceed despite individual errors.
Links and References
- Bitbucket Data Center REST API Documentation
- Bitbucket Pull Requests API
- n8n documentation on creating custom nodes