A Go microservice that receives GitHub organization webhooks and sends formatted notifications to Discord.
- GitHub webhook validation with HMAC-SHA256 signatures
- Organization-level filtering for accepted events
- Discord webhook delivery for supported GitHub events
- Health endpoint at
GET /webhook/health - Webhook receiver at
POST /webhook/github
Supported events:
- Pull requests
- Issues
- Pushes
- Releases
- Create
- Delete
- Fork
- Star
- Ping
- Go
1.25.1+ - A Discord webhook
- GitHub organization admin access for webhook setup
The service reads configuration from environment variables.
Required:
DISCORD_WEBHOOK_IDDISCORD_WEBHOOK_TOKENGITHUB_ORGANIZATIONGITHUB_WEBHOOK_SECRET
Optional:
GITHUB_TOKENPORTdefaults to8080
Example:
cp .env.example .envset -a && source .env && set +a
go run ./cmd/notifyThe service listens on http://localhost:8080 by default.
set -a && source .env && set +a
go test ./...Build and run with Docker Compose:
docker compose up -d --build- Go to your GitHub organization settings.
- Open
Webhooksand create a new webhook. - Use
https://your-server.com/webhook/githubas the payload URL. - Set content type to
application/json. - Use the same secret value as
GITHUB_WEBHOOK_SECRET. - Enable the supported event types or choose all events.
GitHub will send a ping event to verify the webhook.
- Open your Discord channel settings.
- Go to
Integrations->Webhooks. - Create a webhook and copy its URL.
- Extract the webhook ID and token from:
https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN
- Webhooks are validated before payload processing.
- Events outside the configured organization are ignored.
- Local secrets stay in
.env, which is gitignored.