README
Weque is a tool to handle webhooks and notifications.
It's a replacement of hoko.
Features
Weque supports next functions.
- Trigger processe with some environment variables
when receiving webhooks of GitHub
and Bitbucket.
- Kick process with some environmet variables when receiving notifications of docker registry.
- TLS communication
- Notification to slack with rich attachment.
- Helper commands to develop.
- Maintain webhook settings of GitHub and Bitbucket.
- Run handler scripts with payload without receiving webhooks actually.
- Send notification to slack manually.
Installation
go get -u github.com/tmtk75/weque
Getting Started
Prerequisites
export GITHUB_TOKEN=<your github personal access token>
Take it here, https://github.com/settings/tokens
Preparing
$ ngrok http 9981
...
Forwarding https://df431fc9.ngrok.io -> localhost:9981
...
ngrok shows a URL for https and memorize it.
Then start a weque process.
SECRET_TOKEN=abc123 go run ./cmd/weque/main.go server
...
It's ready to receive webhooks.
Create a webhook setting and receive ping
Replace tmtk75/weque
with a repository of yours.
$ go run ./cmd/weque/main.go github create \
tmtk75/weque \
https://df431fc9.ngrok.io \
abc123
Repalce tmtk75/weque
with a repository you have.
You will see some logs appear for receiving a ping just after
you create a webhook if webhook is created properly.
$ go run ./cmd/weque/main.go github list tmtk75/weque
[{"type":"Repsitory","id":26495951,"name":"web","active":true,...
You can also see the webhook you created with github list
command.
Debug
tcpflow on MacOS
$ tcpflow -i lo0 -c 'port 3000'
Development
[0]$ go run ./cmd/weque/main.go serve
...
[1]$ ngrok http 9981
Credit