A Cloudflare Worker that receives GitHub webhooks and forwards formatted notifications to Telegram chats/channels.
- Per-repo configuration stored in Cloudflare KV, with org-level wildcard support
- 27+ GitHub event types with dedicated HTML formatters (push, release, issues, PR, CI, security alerts, etc.)
- Public/private filtering — public targets only receive events from public repos, and sensitive events (security alerts) are filtered out
- Multi-bot support — each target can use a different Telegram bot token
- Admin alerts — signature failures and send errors are reported to a configurable admin chat
- KV config sync tool — CLI script to sync YAML/JSON config files to KV
npm installCreate a config.yaml:
"owner/repo":
secret: "webhook-secret"
targets:
- bot_token: "123:abc"
chat_id: "-100xxx"
events: [push, release, issues, pull_request]
public: false
"__admin__":
bot_token: "456:def"
chat_id: "123456789"Sync to KV:
npx tsx scripts/sync-kv.ts config.yamlnpm run dev # Start local dev server
npm run typecheck # Type checking
npm test # Run tests- Create KV namespaces:
npx wrangler kv namespace create TG_GH_KV
npx wrangler kv namespace create TG_GH_KV --preview-
Replace
KV_ID_PLACEHOLDERandKV_PREVIEW_ID_PLACEHOLDERinwrangler.tomlwith the output IDs. -
Deploy:
npm run deploy- Add the webhook in your GitHub repo settings:
- Payload URL:
https://telegram-github-worker.<your-subdomain>.workers.dev - Content type:
application/json - Secret: Same as in your KV config
- Payload URL:
MIT