Overview

The Bitbucket Event Receive Node enables you to trigger workflows automatically when specific events occur within your Bitbucket workspace. This node listens for configured events, capturing detailed event information for further processing in your workflow.

Configuration Parameters

To use the Bitbucket Event Receive Node effectively, you must complete the following configuration steps:

  • Authentication:

    Authenticate your Bitbucket account within Pathlit. Once authenticated, your account details will be displayed in the node.

  • Workspace Name:

    Specify the Bitbucket workspace name that you want to monitor. This is typically the workspace identifier found in your Bitbucket URL (e.g., workspace-name in bitbucket.org/workspace-name/).

  • Events:

    Select one or more Bitbucket events that will trigger the workflow. Available events include:

    • Pull Request Created (pullrequest:created)
    • Pull Request Updated (pullrequest:updated)
    • Pull Request Approved (pullrequest:approved)
    • Pull Request Unapproved (pullrequest:unapproved)
    • Pull Request Fulfilled (pullrequest:fulfilled)
    • Pull Request Rejected (pullrequest:rejected)
    • Repository Push (repo:push)
    • Repository Fork (repo:fork)
    • Repository Updated (repo:updated)
    • Issue Created (issue:created)
    • Issue Updated (issue:updated)
    • Issue Comment Created (issue:comment_created)

    You can select multiple events to monitor simultaneously.

Trigger Testing Inputs

The workflow containing the Bitbucket Event Receive Node will only trigger when it is saved and deployed. To test the workflow within the editor, click the Run Workflow button. A side panel will appear, allowing you to enter test values:

  • Test Event Type:

    Enter a mock event type to simulate the Bitbucket event (e.g., pullrequest:created). This value will be used when manually testing the node.

  • Test Payload JSON:

    Enter a JSON-formatted payload to simulate the event data. This payload should match the structure of actual Bitbucket event payloads.

    Example payload:

    {
      "pullrequest": {
        "id": 123,
        "title": "Add new feature",
        "author": {
          "username": "johndoe"
        }
      }
    }
    

Expected Inputs and Outputs

  • Inputs:

    • This node does not require inputs from other nodes.
  • Outputs:

    The node provides the following outputs when an event occurs:

    • event_type: The type of Bitbucket event that triggered the workflow (e.g., pullrequest:created).
    • payload_json: The complete event payload as a JSON-formatted string. You can parse this JSON in subsequent nodes for detailed information.

Use Case Examples

  1. Automated Code Review Notifications:

    Trigger workflows when a pull request is created or updated, automatically notifying the appropriate reviewers via Slack or email.

  2. Continuous Integration (CI) Automation:

    Monitor repository pushes (repo:push) to trigger automated builds, tests, and deployments, streamlining your CI/CD pipeline.

  3. Issue Tracking Automation:

    Automatically update your project management tool or notify your team when new issues are created or comments are added in Bitbucket.

  4. Repository Activity Logging:

    Track and log repository activity (forks, updates, etc.) for audit and compliance purposes.

Error Handling and Troubleshooting

  • Workflow Not Triggered by Events:

    If your workflow does not trigger, verify the following:

    • Ensure the workflow is saved and deployed.
    • Confirm that the correct workspace name and events are selected.
    • Check your Bitbucket webhook configuration to ensure events are properly sent to Pathlit.
  • Invalid JSON Payload:

    If the JSON payload provided for testing is invalid, the node will default to the configured test values. Ensure your test payload is correctly formatted JSON.

If you encounter any issues with the Bitbucket Event Receive Node that are not covered in this documentation, please reach out to our support team for assistance.

Relevant Nodes