Skip to content

Kind 30617: Git Repository Announcement

Overview

Kind 30617 defines a Git repository announcement event in the Nostr ecosystem. It's used to announce the existence of a Git repository, along with information about how to access it, browse it, and interact with it through Nostr.

Specification

PropertyValue
Kind Number30617
Event RangeParameterized Replaceable Event
Defined inNIP-34

Content Format

The content field is typically empty for Git repository announcements. All relevant information is contained in the event tags.

Schema

json
""

Tags

Tag NameDescriptionFormatRequired
dRepository identifier["d", "<repo-id>"]Yes
nameHuman-readable project name["name", "<human-readable project name>"]No
descriptionBrief project description["description", "<brief human-readable project description>"]No
webURLs for browsing the repository["web", "<url for browsing>", ...]No
cloneURLs for git-cloning["clone", "<url for git-cloning>", ...]No
relaysRelays that this repository will monitor["relays", "<relay-url>", ...]No
rEarliest unique commit ID["r", "<earliest-unique-commit-id>", "euc"]No
maintainersOther recognized maintainers["maintainers", "<other-recognized-maintainer>", ...]No
tHashtags labelling the repository["t", "<arbitrary string>"]No

Client Behavior

Clients should:

  • Display repository information in a user-friendly manner.
  • Provide ways to clone the repository using the provided URLs.
  • Enable users to send patches, open issues, and engage with the repository as described in NIP-34.
  • Monitor the specified relays for activities related to the repository (patches, issues).

Relay Behavior

Relays should:

  • Store these events according to NIP-01 guidelines.
  • Special handling is not required beyond standard event handling.

Use Cases

  • Announcing a new Git repository to the Nostr network.
  • Specifying how users can interact with the repository through Nostr (for patches, issues).
  • Identifying repository maintainers and relevant relays.
  • Categorizing repositories with hashtags.

Example

json
{
  "id": "ae125548dc5acf424934f0f153f4442fb19a7c7b96a50b3e5c9cc84a5584154f",
  "pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
  "created_at": 1677167833,
  "kind": 30617,
  "tags": [
    ["d", "nostr-protocol"],
    ["name", "Nostr Protocol"],
    ["description", "A truly censorship-resistant alternative to Twitter"],
    ["web", "https://github.com/nostr-protocol/nostr"],
    ["clone", "https://github.com/nostr-protocol/nostr.git"],
    ["relays", "wss://relay.example.com", "wss://nostr.example.org"],
    ["r", "a7f5135e2dc4869588e3e0c56fc69a1187fec193b9b00e96bbee7e330bd2033e", "euc"],
    ["maintainers", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"],
    ["t", "nostr"],
    ["t", "protocol"]
  ],
  "content": "",
  "sig": "70b7bd2d9b06b67de25b8d0943a88903bd7b7ef47f2c3a0ff2d2451af3e0e0f2d38e37afbf210f1541e75ee834194d9126d2fdfdd0a346b24c69a45f9c061b80"
}

References

  • Kind 30618: Git Repository State Announcement
  • Kind 1617: Git Patch
  • Kind 1621: Git Issue
  • Kinds 1630-1633: Git Status Events (Open, Applied/Merged, Closed, Draft)

Notes

The d tag specifies the repository identifier, which is typically a kebab-case short name.

The r tag annotated with the "euc" marker should be the commit ID of the earliest unique commit of the repository. This helps identify the repository among forks and group it with other repositories hosted elsewhere that represent the same project. In most cases, this will be the root commit of a repository.