The Rocket.Chat Bitbucket Cloud app streamlines collaboration by connecting your Bitbucket Cloud repositories directly with your Rocket.Chat workspace. With this app, development teams can receive real-time notifications about commits, pull requests, and other repository events, without leaving Rocket.Chat.
This guide walks you through setting up the integration so your team can stay informed and take action faster, all within your existing workflows.
Admin access on Bitbucket is required to set up this integration.
Installing the Bitbucket Cloud app
To install the Bitbucket Cloud app in Rocket.Chat:
Navigate to Administration > Apps > Marketplace.
In the search bar, type Bitbucket Cloud.
Click Install, then review and accept the required permissions.
Configuring a Bitbucket repository to use the Rocket.Chat Bitbucket app
Step 1. Set up your Bitbucket repository
Login to your Bitbucket account.
Create a new repository, or select an existing one you wish to integrate with Rocket.Chat.
Copy the repository URL. You will need this URL for the subsequent configuration steps.
Step 2. Connect Rocket.Chat to your Bitbucket repository
In Rocket.Chat, navigate to the channel where you want to receive Bitbucket notifications.
In the message input field of the channel, run the following slash command, replacing
[YOUR_REPO_URL]
with the URL you copied in Step 1:/bitbucket connect [YOUR_REPO_URL]
Example: If your repository URL is
git clone https://bitbucket.org/your-team/your-repo
, the command would be:/bitbucket connect https://bitbucket.org/your-team/your-repo
Press
Enter
. You will receive a confirmation message that includes a unique URL. This URL is crucial for setting up your webhook in Bitbucket in the next step.
Step 3. Configure a Webhook in Bitbucket
Now, you need to set up a webhook in Bitbucket to send event data to Rocket.Chat:
In your Bitbucket repository, navigate to Repository settings.
In the left sidebar, under "Workflow," click Webhooks.
Click the Add webhook button.
Fill out the following details for your new webhook:
a. Title: Enter a descriptive name for the webhook (e.g.,
Rocket.Chat Notifications
).b. URL: Paste the unique URL you received in Rocket.Chat after running the
/bitbucket connect
command (from Step 2).c. Triggers: Select the specific events for which you want to receive notifications in Rocket.Chat.
Click Save to finalize the webhook configuration.
To learn more about how webhooks work in general, you can check out the Bitbucket documentation on webhooks.
Note:
After saving, you will see your newly configured webhook listed under "Repository hooks." From here, you can view, edit, or delete the webhook if needed.
To monitor events and troubleshoot, ensure that "Request history collection" is enabled for the webhook. This allows you to view the delivery logs and responses from Rocket.Chat.
Step 4. Test the integration
To confirm your integration is working correctly:
In your Bitbucket repository, perform a change that triggers one of the events you selected for the webhook (e.g., create a new pull request, push a commit, or merge a branch).
Navigate back to your Rocket.Chat channel. If the integration is configured correctly, you should now see a notification showing the details of the change, including the contributor and a summary of the event.
For notifications to appear in Rocket.Chat, ensure the channel you connected (in Step 2) is a public channel. Some integrations may require additional configuration or may not fully support private channels for real-time notifications. If you are not receiving notifications, confirm your channel's visibility settings.
Troubleshooting
If you encounter issues or need further assistance:
View available commands: For a comprehensive list of all available Bitbucket commands within Rocket.Chat, type
/bitbucket help
in your designated Rocket.Chat channel and pressEnter
.Adjust webhook settings: To modify your webhook configuration, including the URL, triggers, or to review delivery history, revisit the Webhooks section within your Bitbucket repository settings.
You have now successfully set up and tested the Bitbucket integration with Rocket.Chat. With this configuration, your team will receive real-time notifications directly in your designated channel, ensuring everyone stays informed about important updates and changes within your Bitbucket repository.