Skip to content

How it works

GitNotify is one core that understands GitHub, and three integrations that draw what the core knows in Discord, Slack and Telegram. The core never depends on a chat platform, and the integrations never depend on each other.

  1. GitHub sends a webhook to POST /github. GitNotify verifies its HMAC signature over the raw body before reading anything.
  2. It routes and de-duplicates. An event for a repository that no chat follows is acknowledged and dropped. A delivery id already seen is acknowledged and changes nothing.
  3. It queues facts and intents. The event becomes facts (state changes, such as "this reviewer approved") and intents ("tell GitHub user X about Y"). The queue carries these, never the GitHub payload.
  4. The core updates its state. Pull request state, run state, incidents and merges are updated with compare-and-swap saves, so parallel work never loses an update.
  5. Each chat that follows the repository is told the card changed. Each Discord server, Slack workspace and Telegram group has its own delivery queue, which draws the card from the latest state and posts or edits it.
  6. Intents become notifications for the people they name, in each chat where that person linked themselves, the way they chose. See Notifications and linking.
Part Does Scoped by
Core ingests GitHub once and keeps platform-neutral state: pull requests with a timeline of structured events, runs with their jobs, incidents, merges and repository settings. Outputs facts and intents GitHub ids
Discord integration servers, routes, channels, encrypted webhooks, card message ids and linked people. Renders cards and DMs, and runs the commands and buttons guild_id
Slack integration workspace installs, routes, channels, card timestamps and linked people. Renders Block Kit cards, and handles signed commands, buttons and lifecycle events team_id
Telegram integration groups, connected repositories, where their cards go (a topic or the group), card message ids and linked people. Renders HTML cards, and handles the webhook: commands, button presses and membership changes chat_id
Shared helpers GitHub sign-in and repository proof, link sessions, ownership changes, digest selection and scheduling, email delivery, encryption and audit none: they use core state and never import a chat integration

The core holds raw GitHub text. All escaping happens in each integration's renderer, just before text reaches a chat. See Security model.

  • Latest state wins. A delivery queue always draws a card from the current state, so a burst of changes folds into one edit. Telegram folds changes over 3 seconds.
  • Never backwards. Facts are idempotent by delivery id, and events that arrive out of order never move a run, job, reviewer or card backwards.
  • Isolated rate limits. When a platform asks GitNotify to slow down (a 429, or Telegram's retry_after), only that server, workspace or group waits. In Telegram, cards, mentions and digests for a group share one queue, because Telegram allows about 20 messages a minute per group. Private messages go straight out.
  • Pause, don't retry. A deleted Discord webhook, an inaccessible Slack channel or a deleted Telegram topic pauses its route and marks it "needs repair" instead of being retried. The repair command in each chat fixes it.
  • Deleted cards come back. If a card's message is deleted, the next change posts a fresh one.
  • Notifications once. Each notification and digest slot is recorded in a ledger when it is sent, so a retry never sends it twice. Discord and Telegram DMs are sent once across servers and groups, Slack DMs once per workspace.
Every Does
15 minutes queues the Discord, Slack and Telegram digests that are due
day applies retention, checks for Discord servers that removed GitNotify, and deletes data for servers, workspaces and groups removed more than 30 days ago

See Data and retention.

The two run the same core and integrations on different foundations:

Hosted (cloud/) Self-hosted (selfhosted/)
Runs on one Cloudflare Worker one Rust binary or container on your Linux host
State Cloudflare D1 SQLite
Queue Cloudflare Queues an in-process queue stored in SQLite, delivered at least once
Delivery per space a Durable Object per server, workspace or group a serial task per server, workspace or group, whose state survives a restart
Schedules Cloudflare cron triggers an in-process scheduler on the same timetable

Shared test fixtures hold the self-hosted server's behaviour to the hosted one's. See Self-hosting and Development.

One GitNotify serves many Discord servers, Slack workspaces and Telegram groups. A repository followed in several of them is ingested once and fanned out to each. Each space can follow up to 50 repositories. Because each space delivers on its own, one busy or rate-limited space never slows the others.