diff options
| author | Francisco Calderón <fjcalderon@gmail.com> | 2024-11-04 15:39:21 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 15:39:21 -0300 |
| commit | 03f3bc39678262ecbd5d870c9da44723023557ff (patch) | |
| tree | e75ecf32d3bc906a8b26314488a1ae90996169c1 /34.md | |
| parent | f72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff) | |
| parent | 6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff) | |
Merge branch 'master' into p2p-nip
Diffstat (limited to '34.md')
| -rw-r--r-- | 34.md | 46 |
1 files changed, 41 insertions, 5 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 requests. | ||
| 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. |
| @@ -53,7 +83,7 @@ The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` | |||
| 53 | ["p", "<repository-owner>"], | 83 | ["p", "<repository-owner>"], |
| 54 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention | 84 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention |
| 55 | 85 | ||
| 56 | ["t", "root"], // ommited for additional patches in a series | 86 | ["t", "root"], // omitted for additional patches in a series |
| 57 | // for the first patch in a revision | 87 | // for the first patch in a revision |
| 58 | ["t", "root-revision"], | 88 | ["t", "root-revision"], |
| 59 | 89 | ||
| @@ -74,15 +104,20 @@ The first patch in a series MAY be a cover letter in the format produced by `git | |||
| 74 | 104 | ||
| 75 | ## Issues | 105 | ## Issues |
| 76 | 106 | ||
| 77 | Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. | 107 | Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. |
| 78 | 108 | ||
| 79 | ```jsonc | 109 | Issues may have a `subject` tag, which clients can utilize to display a header. Additionally, one or more `t` tags may be included to provide labels for the issue. |
| 110 | |||
| 111 | ```json | ||
| 80 | { | 112 | { |
| 81 | "kind": 1621, | 113 | "kind": 1621, |
| 82 | "content": "<markdown text>", | 114 | "content": "<markdown text>", |
| 83 | "tags": [ | 115 | "tags": [ |
| 84 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], | 116 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], |
| 85 | ["p", "<repository-owner>"] | 117 | ["p", "<repository-owner>"] |
| 118 | ["subject", "<issue-subject>"] | ||
| 119 | ["t", "<issue-label>"] | ||
| 120 | ["t", "<another-issue-label>"] | ||
| 86 | ] | 121 | ] |
| 87 | } | 122 | } |
| 88 | ``` | 123 | ``` |
| @@ -102,8 +137,9 @@ Replies are also Markdown text. The difference is that they MUST be issued as re | |||
| 102 | // other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10 | 137 | // other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10 |
| 103 | ["p", "<patch-author-pubkey-hex>", "", "mention"], | 138 | ["p", "<patch-author-pubkey-hex>", "", "mention"], |
| 104 | ["e", "<previous-reply-id-hex>", "", "reply"], | 139 | ["e", "<previous-reply-id-hex>", "", "reply"], |
| 105 | // ... | 140 | // rest of tags... |
| 106 | ] | 141 | ], |
| 142 | // other fields... | ||
| 107 | } | 143 | } |
| 108 | ``` | 144 | ``` |
| 109 | 145 | ||