Gohook
A lightweight GitHub webhook proxy for Discord.
Install / Use
/learn @krabiworld/GohookREADME
Gohook
A lightweight GitHub webhook proxy for Discord.
Installation
Docker
docker run --name gohook -d -p 8080:8080 ghcr.io/krabiworld/gohook
Docker Compose
services:
gohook:
image: "ghcr.io/krabiworld/gohook"
ports:
- "8080:8080"
Kubernetes
helm repo add gohook https://krabiworld.github.io/gohook
helm install gohook gohook/gohook
Or you can use OCI repository:
helm install gohook oci://ghcr.io/krabiworld/gohook
See helm/values.yaml
Precompiled binaries
You can download precompiled binaries for Linux, macOS and Windows from the GitHub Releases page.
Building from source
To build gohook from source, you only need Go (the version specified in go.mod or later).
Start by cloning the repository:
git clone https://github.com/krabiworld/gohook.git
cd gohook
Then build the binary and run it:
go build ./cmd/gohook
./gohook
Usage
- Create a webhook in Discord
- Go to Discord channel settings -> Integrations
- Click Create Webhook, give it a name
- Copy the webhook URL
- Configure GitHub
- Go to
https://github.com/<username>/<repository>/settings/hooks/new - In Payload URL, paste the copied Discord Webhook URL and replace
https://discord.com/api/webhookswith your Gohook URL
Original Discord URL: https://discord.com/api/webhooks/123456/abcdef Replace with Gohook URL: https://gohook.your-domain.com/123456/abcdef- In Content Type, select
application/json - In Secret, paste your secret (if you set environment variable
SECRET) - In Which events would you like to trigger this webhook?, select
Send me everything. - Click Add webhook
- Go to
Configuration
All environment variables are optional.
| Variable | Description | Default value | Example |
|-----------------|-----------------------------------------------------------------------------|---------------|------------------------------------------|
| ADDR | Address and port the server listens on. | :8080 | 127.0.0.1:9000 |
| SECRET | Shared secret to validate GitHub signatures. Leave empty to disable checks. | | random-string |
| HAPPY_EMOJI | Emoji displayed when someone stars the repository. | | 🔥 or <:foxtada:1399709119304306746> |
| SUCCESS_EMOJI | Emoji displayed for successful workflows or checks. | | ✨ or <:catgood:1399709119304306747> |
| FAILURE_EMOJI | Emoji displayed for failed workflows or checks. | | 😭 or <:catscream:1399709119304306748> |
Events
| API name | UI name | Supported actions | Notes |
|-----------------|--------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| check_run | Check runs | completed | Ignores these checks: Dependabot, GitHub Actions and GitHub Advanced Security |
| fork | Forks | | |
| issue_comment | Issue comments | All | |
| issues | Issues | All | |
| public | Visibility changes | | |
| pull_request | Pull requests | All except labeled and synchronize | |
| push | Pushes | | |
| release | Releases | published | |
| repository | Repositories | archived, privatized, renamed and unarchived | |
| star | Stars | created | |
| workflow_run | Workflow runs | completed | Ignores these workflows: CodeQL, Dependabot Updates and Automatic Dependency Submission |
Endpoints
- GET:
/health - POST:
/:id/:token
Proxy support
All standard environment variables are supported, such as HTTP_PROXY, HTTPS_PROXY and ALL_PROXY.
Related Skills
apple-reminders
353.3kManage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
gh-issues
353.3kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
imsg
353.3kiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
