A lightweight webhook relay service that sits between GitHub / Gitea and Discord.
When someone pushes code, Git-Notify pings your Discord channel with @everyone so the team knows to pull.
GitHub/Gitea ──push webhook──▶ Git-Notify ──rich embed──▶ Discord Channel
- 📡 Accepts GitHub and Gitea push webhooks
- 💬 Sends rich Discord embeds with
@everyoneping - 🔐 HMAC-SHA256 signature verification (optional)
- 🔄 Retry logic with Discord rate-limit awareness
- 🪶 Zero database — fully stateless
- 🚀 ~50 lines combined handler logic, dead simple to maintain
git clone https://github.com/your-org/Git-Notify.git
cd Git-Notify
npm installcp .env.example .envEdit .env:
PORT=3000
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN
WEBHOOK_SECRET=your-optional-shared-secret# Development (auto-restarts on changes, Node 18+)
npm run dev
# Production
npm start- Open your Discord server
- Go to Channel Settings → Integrations → Webhooks
- Click New Webhook
- Name it (e.g., "Git-Notify") and choose the target channel
- Copy the Webhook URL → paste it into your
.envasDISCORD_WEBHOOK_URL
- Go to your repo → Settings → Webhooks → Add webhook
- Set:
- Payload URL:
http://your-server:3000/webhook/github - Content type:
application/json - Secret: same value as
WEBHOOK_SECRETin your.env(leave blank if not using) - Events: select Just the push event
- Payload URL:
- Save — GitHub will send a
pingevent and you should see🏓 GitHub ping receivedin the logs
- Go to your repo → Settings → Webhooks → Add Webhook → Gitea
- Set:
- Target URL:
http://localhost:3000/webhook/gitea(since Git-Notify runs on the same machine) - HTTP Method: POST
- POST Content Type:
application/json - Secret: same value as
WEBHOOK_SECRETin your.env - Trigger On: Push Events
- Active: ✅
- Target URL:
- Save & test with the Test Delivery button
Perfect for running alongside your Gitea instance on a closed-network machine:
# Copy files to /opt
sudo cp -r . /opt/git-notify
sudo cp git-notify.service /etc/systemd/system/
# Make sure .env is configured
sudo nano /opt/git-notify/.env
# Enable & start
sudo systemctl daemon-reload
sudo systemctl enable git-notify
sudo systemctl start git-notify
# Check status
sudo systemctl status git-notify
sudo journalctl -u git-notify -f| Method | Path | Description |
|---|---|---|
POST |
/webhook/github |
Receives GitHub push webhooks |
POST |
/webhook/gitea |
Receives Gitea push webhooks |
GET |
/health |
Health check |
@everyone 🚨 Pull your code! New push to org/repo on
mainby username🐙 New push to org/repo
abc1234fix: update the readmedef5678feat: add webhook handlerSource: github • Branch: main
Git-Notify/
├── src/
│ ├── server.js # Express entry point
│ ├── config.js # Env config loader
│ ├── formatter.js # Discord embed formatter
│ ├── discord.js # Discord webhook client
│ └── handlers/
│ ├── github.js # GitHub webhook handler
│ └── gitea.js # Gitea webhook handler
├── .env.example # Config template
├── .gitignore
├── git-notify.service # systemd unit file
├── package.json
└── README.md
MIT