Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

This node interacts with the Bitbucket Data Center API to perform various operations on commits within a specified project repository. Specifically, the "Commit: Get" operation retrieves detailed information about a single commit identified by its commit ID (hash). This is useful for scenarios where you need to fetch metadata or details about a particular commit, such as author information, commit message, timestamp, and changes introduced.

Practical examples include:

  • Automating release notes generation by fetching commit details.
  • Triggering workflows based on specific commit data.
  • Auditing or tracking changes in a repository programmatically.

Properties

Name Meaning
Authentication Method of authentication to use: 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 selected project.
Commit ID The unique ID or hash of the commit to retrieve information for.

Output

The output is a JSON object representing the commit details fetched from the Bitbucket Data Center API. It typically includes fields such as:

  • Commit hash/ID
  • Author information
  • Commit message
  • Timestamp
  • Parent commits
  • Changes or diffs associated with the commit (depending on API response)

If multiple commits were requested (in other operations), the output would be an array of such commit objects.

No binary data output is involved in this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance with API enabled.
  • Requires credentials configured in n8n for authentication, either via a 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}/commits/{commitId}.

Troubleshooting

  • Common issues:

    • Invalid or missing commit ID will cause the API request to fail.
    • Incorrect project key or repository slug will result in "not found" errors.
    • Authentication failures if credentials are incorrect or lack sufficient permissions.
    • Network connectivity issues to the Bitbucket server.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates an issue with the API call; check credentials, URL, and parameters.
    • "The operation "get" is not supported for resource "commit"" would indicate misuse of the node configuration but should not occur if used correctly.
  • Resolutions:

    • Verify that the commit ID exists in the specified repository.
    • Confirm that the project key and repository slug are correct and accessible.
    • Ensure the provided credentials have read access to the repository.
    • Check network connectivity and Bitbucket server availability.

Links and References

Discussion