This project is not updated for Dec 2021. May or may not work. Worth a shot.
A simple BitBucket <-> NodeJS webhook. This uses the GUID from the HTTP header 'x-hook-uuid' from the push request to verify that it's BitBucket.
- node.js
- Linux
Configure webhook.js
with your webhook's x-hook-uuid
, port number and correct /path/to/repo
.
Next, configure the webhook.service
file with your node
and webhook.js
paths, and the target port you're going to use with the node
server, and then move it to:
/etc/systemd/system/webhook.service
Make sure file permissions are set to 0644 and file ownership is root:root, which is standard practice for all system files.
Then run the following command to start webhook.service
.
sudo systemctl start webhook
To verify your new webhook service is working, run:
sudo systemctl status webhook
Make sure you unblock the port you set the new Node server to run on. Also, if you can't find it, you look in the webhooks section in BitBucket, you'll get your x-hook-uuid.
ETH: 0x0463955E40709010000D5eD03603D859C57B5cE0
GNU General Public License v3.0
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.