GitHub → nostr: the missing half of NIP-34
GitHub → nostr: the missing half of NIP-34
NIP-34 gives git repositories a nostr-native coordination layer. It does not make GitHub activity appear there by itself. A project can have a proper kind 30617 announcement while almost all of its actual review happens somewhere nostr clients cannot see.
I open-sourced github-nostr-bridge v0.1.0 to close that direction.
Live, not a proposal
The bridge is dogfooded on mstrofnone/nmc-rpc-explorer. These are public receipts, not screenshots of a local test:
- PR opened → kind
1618— Actions run. - PR merged → kind
1631— Actions run. - PR closed unmerged → kind
1632— Actions run.
All three events are fetchable from relay.ngit.dev, git.shakespeare.diy, and nos.lol.
How it works
A stateless GitHub Actions workflow maps webhooks to signed events: PR opens and updates (1618/1619), issues (1621), open/merged/closed/draft status (1630–1633), and NIP-22 comments (1111). No server, no inbound ports, no always-on daemon. It runs in GitHub’s free CI minutes and tolerates individual relay failures.
A dedicated bot key signs the events. List that pubkey in the repository announcement’s maintainers tag so clients can attribute its output to the repo. The owner’s main key never touches CI. The signature proves which bot produced an event; the kind 30617 declaration connects that bot to the repository.
The source tag is the reconciliation mechanism
Actions workers have no memory. A merge webhook can arrive days after the open event, but the status event still needs its thread root. Every bridged event therefore carries:
["source", "github", "https://github.com/<owner>/<repo>/pull/7"]
Later runs query their own earlier 1618/1621 events and match this canonical URL. That provides deduplication and reconciliation without a database. A merged status can e-tag the original PR open as its root instead of creating an orphaned status update.
This tag is deliberately nonstandard. Existing clients can ignore it; Amethyst currently does. But the convention gives any client or alternate bridge a deterministic foreign identifier. No scraping prose, fuzzy subject matching, or centralized mapping service. The GitHub ↔ nostr linkage is public and explicit.
Amethyst is Exhibit A
Even Amethyst—the flagship nostr client, with a repository announcement Vitor maintains personally—has no GitHub → nostr bridge. GitHub shows roughly 4,213 PRs; its nostr repository address shows roughly 100 nostr-native PRs. About 98% of real pull-request activity is invisible to nostr watchers.
The client side has a second gap. Amethyst parses kind 1618 and includes PRs in the repository Patches feed, but has no dedicated PR card: they fall back to generic text rendering. Its clone URLs are parsed and displayed as links, not fetched during rendering; repository content subscriptions use nostr relays. A github.com clone URL therefore breaks nothing. There is no hidden GRASP or Blossom dependency in this path, and the unknown source tag is inert metadata.
What clients can do with the feed
Render proper PR cards with state, branches, head commit, and GitHub provenance. Notify users about activity regardless of which door contributors used. Reconcile mirrored and nostr-native threads through explicit identifiers. Attribute automation through maintainers instead of pretending a human typed every event.
Mirroring is not sovereignty. It makes existing activity visible and verifiable on an open protocol while preserving an exit. Phase 1 is deliberately one-way: nothing is written back to GitHub.
If your repository has a kind 30617 announcement but your contributors still work on GitHub, your nostr feed is incomplete. Run the bridge.
Write a comment