Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Actions29

Overview

This node integrates with the Bitbucket Data Center API to manage pull requests within a specified project repository. Specifically, the "Update Pull Request" operation allows users to modify the title of an existing pull request by its ID. This is useful in scenarios where you want to programmatically update pull request metadata, such as correcting or clarifying the title after creation.

Practical examples include:

  • Automatically updating pull request titles based on external events or naming conventions.
  • Renaming pull requests in bulk during migration or cleanup tasks.
  • Integrating with CI/CD pipelines to reflect build statuses or other dynamic information in the pull request title.

Properties

Name Meaning
Authentication Method of authentication: either "Personal Access Token" or "Basic Auth".
Project The key of the Bitbucket project containing the repository.
Repository The slug (identifier) of the repository within the project.
Pull Request ID The numeric ID of the pull request to update.
Title The new title to set for the pull request.

Output

The node outputs a JSON object representing the updated pull request as returned by the Bitbucket Data Center API. This typically includes fields such as the pull request ID, updated title, state, author, source and destination branches, and other metadata.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance with appropriate API permissions.
  • Requires configuration of credentials in n8n for either Personal Access Token or Basic Authentication.
  • The node uses the Bitbucket Data Center REST API endpoint /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId} with HTTP PUT method to perform the update.

Troubleshooting

  • Common issues:

    • Invalid or missing project key, repository slug, or pull request ID will cause API errors.
    • Insufficient permissions or incorrect authentication credentials will result in authorization failures.
    • Providing an empty or invalid title may cause the API to reject the update.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates a failure in the API call; check network connectivity, credentials, and input parameters.
    • "The operation "update" is not supported for resource "pullRequest" would indicate misuse of the node configuration but should not occur if configured correctly.
  • Resolutions:

    • Verify that the project key and repository slug exist and are accessible.
    • Ensure the pull request ID corresponds to an existing pull request.
    • Confirm that the authentication credentials have sufficient rights to update pull requests.
    • Double-check the title field is non-empty and valid.

Links and References

Discussion