Bitbucket to Skype webhook
- Create an account for Skype
- Create a Skype group
- Invite other users to the newly created Skype group
- Find
ConversationId
on web.skype.com using Network Tools on your browser
- Add email, password and group to
src/config.ini
[config]
email = user@email.com
password = supersecretpassword
group = 12:34567890abcdefghijklmnopqrstuvwx@thread.skype
You can also add multiple accounts. For example on using Uptime Kuma
uptime_email = uptime-kuma@email.com
uptime_password = supersecretpassword
uptime_group = 19:2345ab6cd6789e0f1g23h4h5i6j7890c@thread.skype
Simulate webhook trigger from Bitbucket
$ git clone https://github.com/kleo/bitsky
$ cd bitsky
$ python -m venv --copies venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python src/bitsky.py
$ curl http://localhost:5000/build -H 'Content-Type:application/json' -d @requests/build/build-inprogress.json
Using ngrok for bitbucket webhook testing
$ ngrok http 5000
$ curl https://123a-45-678-901-234.ngrok-free.app/build -H 'Content-Type:application/json' -d @requests/build/build-successful.json
Copy ngrok url to Bitbucket Repository > Webhooks > Edit webhook
docker build and push
$ docker build -t registry.example.com/bitsky:latest .
$ docker push registry.example.com/bitsky:latest
$ docker pull registry.example.com/bitsky:latest
$ docker run --restart=always -p 127.0.0.1:8000:80 registry.example.com/bitsky:latest
Using Caddy
webhook.example.com {
reverse_proxy /push 127.0.0.1:8000
reverse_proxy /build 127.0.0.1:8000
reverse_proxy /pr 127.0.0.1:8000
reverse_proxy /health 127.0.0.1:8000
# reverse_proxy /uptime 127.0.0.1:8000
log {
output file /var/log/webhook.example.com.log {
roll_size 10mb
roll_keep 20
roll_keep_for 720h
}
}
}
Build sucessful
Build failed
Open pull request
- Support Bitbucket webhook secret
- Support other triggers