Bitbucket Cloud App

The Rocket.Chat Bitbucket Cloud app enhances collaboration for development teams by seamlessly integrating Bitbucket Cloud with Rocket.Chat. This app enables users to perform various tasks, such as receiving notifications on commits and pull requests and staying updated on repository events—all directly within the Rocket.Chat workspace.

This document covers how to integrate the Rocket.Chat Bitbucket app with your Bitbucket Cloud repository to enable real-time notifications in Rocket.Chat channels.

Admin access on Bitbucket is required to set up this integration.

Install Bitbucket Cloud app

To install the Bitbucket Cloud app,

  • Navigate to Administration > Apps > Marketplace

  • Search for the Bitbucket Cloud app

  • Click Install and accept the permissions needed to install it

Configure a Bitbucket repository to use the Rocket.Chat Bitbucket app

Step 1. Set up your Bitbucket repository

  1. Visit your Bitbucket account

  2. Create a new repository or open an existing one

  3. Copy the repository’s URL, as you’ll need it for the next steps

Step 2. Connect Rocket.Chat to your Bitbucket repository

  1. In Rocket.Chat, go to the channel where you want to receive Bitbucket notifications.

  2. Run the following command, replacing Repo-URL with the URL you copied:

    /bitbucket connect Repo-URL
  3. Press Enter. You should see a confirmation message with a URL which you will use for setting up your webhook

Step 3. Configure a Webhook in Bitbucket

  1. In your Bitbucket repository, go to Repository settings

  2. Under Webhooks, click Add webhook

  3. Fill out the following details:

    1. Title: Add a name for the webhook

    2. URL: Paste the URL you received after connecting your Rocket.Chat channel

    3. Triggers: Select the events for which you want to receive notifications in Rocket.Chat, such as pull requests or pushes

  4. Save the webhook configuration

Step 4. Test the integration

  1. Make a change in the repository (e.g., create a pull request or push a commit)

  2. If configured correctly, you should see a notification in your Rocket.Chat channel showing the details of the change, including the contributor and summary

Troubleshooting

For a list of available Bitbucket commands, run /bitbucket help in your Rocket.Chat channel.

If you encounter any issues or need to modify the webhook settings, you can revisit the Webhooks section in your Bitbucket repository settings to make adjustments.

You have now successfully set up and tested the Bitbucket integration with Rocket.Chat. With this configuration, your team will receive real-time notifications in your designated channel, informing everyone of important updates and changes in your Bitbucket repository.