A lightweight Go service that listens for GitHub webhooks and forwards notifications to Telegram chats with clean formatting.
- Real-time GitHub event notifications in Telegram
- Supports 20+ GitHub event types (pushes, PRs, issues, deployments, etc.)
- Clean, formatted messages with emoji visual cues
- Easy deployment to Vercel
- Lightweight
- Go 1.20+ (for local development)
- Telegram bot token
- GitHub repository admin access
git clone https://github.com/AshokShau/github-telegram-notify.git
cd github-telegram-notify
go run main.go
For local testing, expose your port using:
ngrok http 3000
-
Environment Variables:
BOT_TOKEN
: Your Telegram bot tokenPORT
: Server port (default: 3000)
-
GitHub Webhook Setup:
- Payload URL:
https://your-domain.com/github?chat_id=YOUR_CHAT_ID
- Content type:
application/json
- Events: Select events to forward
- Payload URL:
Event Type | Description |
---|---|
Push | Code pushes to branches |
Pull Request | PR opened/closed/merged |
Issues | Issue created/commented/closed |
Releases | New version releases |
Deployments | Code deployments |
Security Advisories | Vulnerability alerts |
And More | ...... |
- Fork this repository
- Create new Vercel project
- Import your forked repo
- Add
BOT_TOKEN
in project settings - Deploy!
Build and run the binary:
go build -o gh-telegram
./gh-telegram
- Endpoint:
/github
- Handles GitHub webhooks - Query Params:
chat_id
: Required Telegram chat ID
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a PR with clear description
MIT License - See LICENSE for details.