• Applicable Software: MokoGIT
  • Min Version Number: 02.89.01
  • Max Version Number: Not Applicable

What it is

ntfy is a simple publish-subscribe notification service: you POST a message to a topic URL and every subscriber to that topic receives a push. MokoGIT ships a server-side ntfy notifier that turns forge events into ntfy pushes. Rather than firing everything at one firehose topic, MokoGIT routes by event category to per-event topics: a topic for issues, one for pull requests, one for Actions (CI), and one for releases. Operators subscribe to the topics they care about and ignore the rest.

This is a server-level integration, so it covers the whole instance (and each organization and repository can refine it). It is distinct from a user's personal subscriptions: the per-event topics are the operational channels for the forge itself, which is exactly why the Actions watchdog crons use the CI topic to raise alerts.

Why and when it matters

Email is a poor channel for operational signals: it is slow, easily filtered into noise, and hard to route selectively. A CI stall or a wedged build needs to reach an on-call operator in seconds, on a device they actually watch. ntfy delivers an instant push with a priority and a tap-through link, and because MokoGIT routes by category you can put CI alerts on a high-priority topic that pages your phone while issue and PR notifications go to quieter topics.

The per-event split also lets different audiences subscribe to different streams: your release channel can feed a public announcements feed, while the Actions channel stays an internal operations feed.

How it works

The notifier is registered at startup and decides at send time whether a given event is actually delivered, so enabling ntfy from the admin UI takes effect without a restart. For each event it resolves the effective configuration by layering three tiers, each overriding the non-empty fields of the one before it:

  1. Instance - the baseline server URL, token, default topic, and the four per-event topics.
  2. Organization - an org can override the server, token, default topic, or any per-event topic for its own repositories.
  3. Repository - a repo can override the same fields, supply a subject prefix, and - critically - set its own Enabled master toggle and per-event mutes.

Once the effective config is resolved, routing a single event is straightforward. The notifier picks the topic for the event's category; if that per-event topic is empty it falls back to the default topic. It then checks that ntfy is enabled and a server URL is set, checks that the repo has not muted this category, and sends asynchronously (in a goroutine) so a slow or unreachable ntfy server never blocks the forge operation that triggered it.

The four per-event topics

  • Issues (topic_issues) - new issues and issue open/close transitions. Mentioned users additionally get a personal push.
  • Pulls (topic_pulls) - new pull requests and merges. Mentioned users get a personal push.
  • Actions (topic_actions) - CI workflow-run outcomes. The notifier pushes on every terminal state and stays silent on waiting/running/blocked. Priority and tags vary by outcome: failures go out at high priority, success at default, cancelled at default, and skipped at low.
  • Releases (topic_releases) - new releases, sent at high priority.

Each push carries a title, a short body, a priority, ntfy tags (which render as emoji/badges), and a Click link back to the event in MokoGIT, so tapping the notification opens the issue, PR, run, or release. Message bodies are clamped to stay under ntfy's size limit; if a body would be too long it is truncated with a note to open the event for the full content (this avoids ntfy silently turning a long message into a file attachment).

How the Actions watchdogs use it

The per-event Actions topic is also the alert channel for the CI maintenance crons. The detect_dispatch_stall watchdog, when it finds a job starved behind an idle, capable runner, resolves the instance Actions topic and pushes a high-priority alert tagged for a CI stall. The same path escalates jobs the stuck-job detector verdicts as stuck or wedged. These alerts are de-duplicated in memory per repository and label set, so an ongoing multi-hour stall pushes once on detection and then at most once per interval, rather than every cron cycle. A slow-but-healthy build is deliberately left silent.

Step by step: enabling ntfy

Instance baseline (app.ini)

The server defaults live in the [ntfy] section. A database system-setting can override any of these later from the admin UI without a restart.

[ntfy]
ENABLED = true
SERVER_URL = https://ntfy.mokoenterprises.us
DEFAULT_TOPIC = mokogit
TOKEN = tk_your_access_token
TOPIC_ISSUES = mokogit-issues
TOPIC_PULLS = mokogit-pulls
TOPIC_ACTIONS = mokogit-actions
TOPIC_RELEASES = mokogit-releases

If a per-event topic is left blank, that category falls back to DEFAULT_TOPIC. The token is optional - omit it for public topics; supply it for protected topics (it is sent as a bearer token).

Per-organization and per-repository overrides (UI)

  1. For an organization: go to the organization, then Settings, then Notifications (ntfy) and set any topic or server override for that org's repos.
  2. For a repository: go to the repository, then Settings, then Notifications (ntfy). Here you can toggle ntfy on/off for the repo, set a subject prefix, override topics, and mute individual categories (issues, pulls, actions, releases) while still inheriting the server and token from the org or instance.

Subscribe

Point the ntfy mobile or desktop app (or a browser subscription) at your server and subscribe to the topics you care about - for example, subscribe only to mokogit-actions if you are on CI duty.

Caveats

  • ntfy sends are best-effort and asynchronous: a failed push is logged, not retried, and never blocks or fails the underlying forge operation.
  • Enabling is gated at the instance level. A repo's Enabled toggle only takes effect while the instance master switch is also on - a repo cannot turn ntfy on for itself if the instance has it off.
  • If both a per-event topic and the default topic are empty for a category, that event is simply not sent.
  • The Actions topic carries two different things: ordinary CI-run outcome notifications and the watchdog stall/stuck alerts. If you want the watchdog pages louder than routine run notices, subscribe with ntfy's own priority filtering, since both use the same topic.
  • Watchdog de-duplication is in-memory, so a MokoGIT restart resets it - an ongoing stall will re-alert once after a restart. This is intentional and harmless.
  • Long bodies (such as verbose release notes) are truncated in the push; the full content is always one tap away via the Click link.

Get help

Open a support ticket or call (931) 820-0265.