diff --git a/34.md b/34.md index 52e23b50..4989803d 100644 --- a/34.md +++ b/34.md @@ -35,6 +35,36 @@ The `r` tag annotated with the `"euc"` marker should be the commit ID of the ear Except `d`, all tags are optional. +## Repository state announcements + +An optional source of truth for the state of branches and tags in a repository. + +```jsonc +{ + "kind": 30618, + "content": "", + "tags": [ + ["d", ""], // matches the identifier in the coresponding repository announcement + ["refs//",""] + ["HEAD", "ref: refs/heads/"] + ] +} +``` + +The `refs` tag may appear multiple times, or none. + +If no `refs` tags are present, the author is no longer tracking repository state using this event. This approach enables the author to restart tracking state at a later time unlike [NIP-09](09.md) deletion. + +The `refs` tag can be optionally extended to enable clients to identify how many commits ahead a ref is: + +```jsonc +{ + "tags": [ + ["refs//", "", "", "", ...], + ] +} +``` + ## Patches Patches can be sent by anyone to any repository. Patches to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch events SHOULD include an `a` tag pointing to that repository's announcement address.