A simple flask application that acts as a notification bridge between Bitbucket and Google Chat.
docker build -t bb-gc-api -f Dockerfile .
docker run -d --rm --name bb-gc-api -p 5000:5000 bb-gc-api
repo:refs_changedrepo:modifiedrepo:forkrepo:comment:addedrepo:comment:editedrepo:comment:deletedpr:openedpr:from_ref_updatedpr:modifiedpr:reviewer:updatedpr:reviewer:approvedpr:reviewer:unapprovedpr:reviewer:needs_workpr:mergedpr:declinedpr:deletedpr:comment:addedpr:comment:editedpr:comment:deleted
See this page for more information on event payloads.
mirror:repo_synchronized is not supported.
Bitbucket webhook configuration:
http://my-api-url/api/bitbucket/invoke?space=[SPACE_KEY]&key=[GOOGLE_CHAT_KEY]&token=[GOOGLE_CHAT_TOKEN]
Replace the follow variables in brackets above:
SPACE_KEYThe space key in the google chat webhook urlGOOGLE_CHAT_KEYThe key parameter in the google chat webhook urlGOOGLE_CHAT_TOKENThe token parameter in the google chat webhook url
The application runs in insecure mode by default. The application will not verify message integrity in insecure mode.
Set the environment variable BBGC_SECRET_TOKEN to enable secure mode. The value of this token must equal the value of
the Secret field on the Bitbucket webhook configuration page. Secure mode will validate all your requests using the token
set by BBGC_SECRET_TOKEN. If the message integrity cannot be verified, the message will be dropped.
BBGC_SECRET_TOKEN can be set when running with docker with the parameter -e BBGC_SECRET_TOKEN=my-token-value
See this page for more information.
This project has only been tested with Bitbucket Server 6.x and above.
Compatibility with Bitbucket Cloud is unknown.
Copyright (c) 2022 Travis Ball
Licensed under the MIT License