This repository is community supported and not maintained by Mattermost. Mattermost disclaims liability for integrations, including Third Party Integrations and Mattermost Integrations. Integrations may be modified or discontinued at any time.
A Bitbucket plugin for Mattermost. Based on the mattermost-plugin-bitbucket developed by jfrerich.
The Bitbucket plugin features include:
/bitbucket
slash command.This guide is intended for Mattermost System Admins setting up the Bitbucket plugin and Mattermost users who want information about the plugin functionality. For more information about contributing to this plugin, visit the Development section. The Mattermost Bitbucket plugin uses a webhook to connect your Bitbucket account to Mattermost to listen for incoming Bitbucket events. Events notifications are via Direct Message in Mattermost. The Events don’t need separate configuration.
This guide assumes:
Download the latest plugin binary release and upload it to your server via System Console > Plugin Management. To learn more about how to upload a plugin, see the documentation.
Configuration is started in Bitbucket and completed in Mattermost.
Mattermost Bitbucket Plugin - <your company name>
.https://your-mattermost-url.com/plugins/bitbucket/oauth/complete
, replacing https://your-mattermost-url.com
with your Mattermost deployment's Site URL.Email
and Read
permissions.Read
permission.Read
and Write
permissions.Read permission
.Read
and Write
permissions.You must create a webhook for each repository you want to receive notifications for or subscribe to.
Mattermost Bitbucket Webhook - <repository_name>
, replacing repository_name
with the name of your repository.https://your-mattermost-url.com/plugins/bitbucket/webhook?secret=SOME_SECRET
https://your-mattermost-url.com
with your Mattermost deployment's Site URL.SOME_SECRET
with the secret generated in System Console > Plugins > Bitbucket > Webhook Secret.Push
.Created
, Updated
, Approved
, Approval removed
, Merged
, Declined
, Comment created
.Created
, Updated
, Comment created
.If you have multiple repositories, repeat the process to create a webhook for each repository.
If you have an existing Mattermost user account with the name bitbucket
, the plugin will post using the bitbucket
account but without a BOT tag.
To prevent this, either:
Convert the bitbucket
user to a bot account by running mattermost user convert bitbucket --bot
in the CLI.
or
If the user is an existing user account you want to preserve, change its username and restart the Mattermost server. Once restarted, the plugin will create a bot account with the name bitbucket
.
Open System Console > Plugins > Bitbucket and do the following:
You're all set!
When you’ve tested the plugin and confirmed it’s working, notify your team so they can connect their Bitbucket account to Mattermost and get started. Copy and paste the text below, edit it to suit your requirements, and send it out.
Hi team, We've set up the Mattermost Bitbucket plugin, so you can get notifications in Mattermost. To get started, run the
/bitbucket connect
slash command from any channel within Mattermost to connect your Mattermost and Bitbucket accounts. Then, take a look at the slash commands section for details about how to use the plugin.
/bitbucket subscriptions add
to subscribe a Mattermost channel to receive notifications for new pull requests, issues, branch creation, and more in a Bitbucket repository.
/bitbucket subscribe mattermost/mattermost-server issues,pulls,issue_comments
/bitbucket todo
to get an ephemeral message with items to do in Bitbucket, including a list of assigned issues and pull requests awaiting your review./bitbucket settings
to update your settings for notifications and daily reminders.Run /bitbucket help
to see what else the slash command can do.
Feel free to create a GitHub issue or join the Bitbucket Plugin channel on our community Mattermost instance to discuss.
Bitbucket user tokens are AES-encrypted with an At Rest Encryption Key configured in the plugin's settings page. Once encrypted, the tokens are saved in the PluginKeyValueStore
table in your Mattermost database.
This plugin contains both a server and web app portion. Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.
The version of a plugin is determined at compile time, automatically populating a version
field in the plugin manifest:
v
, e.g. 1.3.1
.git rev-parse --short HEAD
, e.g. 1.3.1+d06e53e1
.0.0.0+76081421
.To disable this behaviour, manually populate and maintain the version
field.
This repository is licensed under the Apache 2.0 License.