diff options
Diffstat (limited to '34.md')
| -rw-r--r-- | 34.md | 30 |
1 files changed, 30 insertions, 0 deletions
| @@ -35,6 +35,36 @@ The `r` tag annotated with the `"euc"` marker should be the commit ID of the ear | |||
| 35 | 35 | ||
| 36 | Except `d`, all tags are optional. | 36 | Except `d`, all tags are optional. |
| 37 | 37 | ||
| 38 | ## Repository state announcements | ||
| 39 | |||
| 40 | An optional source of truth for the state of branches and tags in a repository. | ||
| 41 | |||
| 42 | ```jsonc | ||
| 43 | { | ||
| 44 | "kind": 30618, | ||
| 45 | "content": "", | ||
| 46 | "tags": [ | ||
| 47 | ["d", "<repo-id>"], // matches the identifier in the coresponding repository announcement | ||
| 48 | ["refs/<heads|tags>/<branch-or-tag-name>","<commit-id>"] | ||
| 49 | ["HEAD", "ref: refs/heads/<branch-name>"] | ||
| 50 | ] | ||
| 51 | } | ||
| 52 | ``` | ||
| 53 | |||
| 54 | The `refs` tag may appear multiple times, or none. | ||
| 55 | |||
| 56 | 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. | ||
| 57 | |||
| 58 | The `refs` tag can be optionally extended to enable clients to identify how many commits ahead a ref is: | ||
| 59 | |||
| 60 | ```jsonc | ||
| 61 | { | ||
| 62 | "tags": [ | ||
| 63 | ["refs/<heads|tags>/<branch-or-tag-name>", "<commit-id>", "<shorthand-parent-commit-id>", "<shorthand-grandparent>", ...], | ||
| 64 | ] | ||
| 65 | } | ||
| 66 | ``` | ||
| 67 | |||
| 38 | ## Patches | 68 | ## Patches |
| 39 | 69 | ||
| 40 | 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. | 70 | 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. |