Bitbucket
Send Bitbucket Cloud repository events to Telegram.
Add the webhook
In your repository open Repository settings โ Webhooks โ Add webhook and fill the form:
| Field | Value |
|---|---|
| Title | Any name, for example Thook |
| URL | https://thook.altr.dev/hooks/bitbucket/{unique_path} |
| Secret | The secret key from the bot |
| Status | Active |
| Triggers | Choose from a full list of triggers, then pick the ones below |
Bitbucket does not show the secret again after you save the webhook. Save, then open the webhook and use View requests: a 202 means it works.
Supported events
- Push, including the creation and the deletion of branches and tags
- Fork
- Build status created and build status updated: the result of Bitbucket Pipelines and of the other CI tools that report on a commit
- Pull requests: created, updated, approved, approval removed, changes requested, change request removed, merged, declined, and comments (created, updated, deleted)
- Issues: created, updated and comment created, when the issue tracker is on
You choose the events: Thook shows the ones the webhook sends. Other events are accepted and ignored.
What you get
The title tells the event, then the details, who did it and a link to the event as the last line. The meaning of the icons is in the quick start.
๐ฃ Push ยท Bitbucket
๐ฆ workspace/app ยท main
๐ 2 commits
โข Fix the start message
โข Add tests
๐ค Alice
View push
๐ข Build passed ยท Bitbucket
๐ฆ workspace/app
๐ 709d658
โ๏ธ Unit Tests ยท ๐ 1m 5s
๐ค Alice
View build
๐ฃ Pull request merged ยท Bitbucket
๐ฆ workspace/app
๐ฐ #7 Add rate limiting
๐ฟ feat/rate-limit โ main
๐ค Bob
Open PR
A few things are different from the other services:
- Bitbucket lists up to 5 commits of a push and does not say how many there are in total: when there are more the message says
5+ commits. - The status of a build is not tied to a branch, the message shows the commit instead.
- A build is one message that updates from running to the result, and the result is a new message: see Workflows, pipelines and deploys.
Troubleshooting
401in View requests: the Secret is different from the one in the bot message. Bitbucket does not show it after saving, so edit the webhook and type it again.- Nothing arrives but the status is
202: the event is not in the list above. - Redeliver: Bitbucket keeps the requests of the last days in View requests, with the option to send them again.