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 other related resources. Specifically, for the Pull Request - Get Participants operation, it retrieves all participants involved in a specified pull request within a repository. This is useful for understanding who is involved in reviewing or contributing to a pull request.

Common scenarios include:

  • Automatically fetching the list of reviewers and participants on a pull request to notify them or update external systems.
  • Auditing or reporting on pull request activity by identifying all contributors.
  • Integrating participant data into workflows that require awareness of pull request stakeholders.

Example: You have a workflow that triggers when a pull request is updated, and you want to fetch all participants to send them a summary email or update a project management tool.

Properties

Name Meaning
Authentication Method used to authenticate API requests. Options: Personal Access Token, Basic Auth.
Project The key of the project containing the repository and pull request.
Pull Request ID The numeric ID of the pull request to get participants from.

Output

The output is a JSON array where each item represents a participant in the specified pull request. Each participant object typically includes details such as user information, approval status, role (e.g., reviewer), and participation state.

No binary data is output by this operation.

Example output snippet (simplified):

[
  {
    "user": {
      "name": "johndoe",
      "displayName": "John Doe",
      "emailAddress": "john.doe@example.com"
    },
    "role": "REVIEWER",
    "approved": true,
    "status": "APPROVED"
  },
  {
    "user": {
      "name": "janedoe",
      "displayName": "Jane Doe",
      "emailAddress": "jane.doe@example.com"
    },
    "role": "PARTICIPANT",
    "approved": false,
    "status": "NEEDS_WORK"
  }
]

Dependencies

  • Requires access to a Bitbucket Data Center instance with appropriate API permissions.
  • Requires an API authentication credential configured in n8n, either 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}/pull-requests/{pullRequestId}/participants.

Troubleshooting

  • Error: "Bitbucket Data Center API request failed"
    This indicates a problem with the API call, possibly due to incorrect credentials, insufficient permissions, or an invalid URL. Verify your authentication credentials and ensure the Bitbucket server URL is correct.

  • Error: "The operation 'getParticipants' is not supported for resource 'pullRequest'"
    This would occur if the operation name is misspelled or unsupported. Confirm the operation parameter is exactly getParticipants.

  • Empty results or missing participants
    Ensure the provided project key, repository slug, and pull request ID are correct and that the pull request actually has participants.

  • Authentication issues
    If using Basic Auth, verify username and password/API token correctness. For Personal Access Tokens, ensure the token has sufficient scopes.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion