Routes GitHub webhook events to Discord. One endpoint, multiple channels — send pushes to #commits, releases to #releases, everything else to a catch-all.
No database, no dependencies beyond the YAML parser. Single binary.
Copy the example config and fill it in:
cp config.example.yml config.ymlserver:
port: 8080
secret: "your-github-webhook-secret"
routes:
- events: [push]
webhook: "https://discord.com/api/webhooks/..."
- events: [release, repository]
webhook: "https://discord.com/api/webhooks/..."
- events: ["*"]
webhook: "https://discord.com/api/webhooks/..."Routes are matched in order. An event can match more than one route and will be sent to all matching webhooks. "*" matches every event type.
docker compose up -dOr without Compose:
docker build -t dispatch .
docker run -d -p 8080:8080 -v $(pwd)/config.yml:/app/config.yml:ro dispatchgo mod tidy
go build -o dispatch ./cmd/server
./dispatch
# custom config path:
./dispatch /path/to/config.yml- Go to your repository or organization → Settings → Webhooks → Add webhook
- Set Payload URL to
http://your-server:8080/webhook - Set Content type to
application/json - Set Secret to match
server.secretin your config - Choose Send me everything or pick individual events
GitHub will send a ping event when the webhook is first saved — dispatch handles it silently.
| Event | Triggers |
|---|---|
push |
Commits pushed to any branch |
repository |
Created, deleted, renamed, archived, transferred, made public/private |
create |
Branch or tag created |
delete |
Branch or tag deleted |
fork |
Repository forked |
watch |
Repository starred |
pull_request |
Opened, closed, merged, or reopened |
release |
Release published |
member |
Collaborator added or removed |
issues |
Issue opened, closed, or reopened |
Events not in this list are received and acknowledged but not forwarded.
MIT