diff options
| author | hodlbod <jstaab@protonmail.com> | 2024-05-30 12:25:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 12:25:30 -0700 |
| commit | cb29f752e87446119ea6a5f066c6be352d8b87ca (patch) | |
| tree | a0714a2170a82437a68de50e9f78486b54d8e6a1 /34.md | |
| parent | 1dc8d1857172d74e81097f34f1f5c58bcc29ac51 (diff) | |
| parent | 5c796c19fd6330628a0b328bfcf5270cb2bc3aff (diff) | |
Merge branch 'master' into nip-72-edits
Diffstat (limited to '34.md')
| -rw-r--r-- | 34.md | 62 |
1 files changed, 56 insertions, 6 deletions
| @@ -17,17 +17,21 @@ Git repositories are hosted in Git-enabled servers, but their existence can be a | |||
| 17 | "kind": 30617, | 17 | "kind": 30617, |
| 18 | "content": "", | 18 | "content": "", |
| 19 | "tags": [ | 19 | "tags": [ |
| 20 | ["d", "<repo-id>"], | 20 | ["d", "<repo-id>"], // usually kebab-case short name |
| 21 | ["name", "<human-readable project name>"], | 21 | ["name", "<human-readable project name>"], |
| 22 | ["description", "brief human-readable project description>"], | 22 | ["description", "brief human-readable project description>"], |
| 23 | ["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing | 23 | ["web", "<url for browsing>", ...], // a webpage url, if the git server being used provides such a thing |
| 24 | ["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it | 24 | ["clone", "<url for git-cloning>", ...], // a url to be given to `git clone` so anyone can clone it |
| 25 | ["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues | 25 | ["relays", "<relay-url>", ...] // relays that this repository will monitor for patches and issues |
| 26 | ["r", "<earliest-unique-commit-id>", "euc"] | ||
| 27 | ["maintainers", "<other-recognized-maintainer>", ...] | ||
| 26 | ] | 28 | ] |
| 27 | } | 29 | } |
| 28 | ``` | 30 | ``` |
| 29 | 31 | ||
| 30 | The tags `web`, `clone`, `relays` can have multiple values. | 32 | The tags `web`, `clone`, `relays`, `maintainers` can have multiple values. |
| 33 | |||
| 34 | The `r` tag annotated with the `"euc"` marker should be the commit ID of the earliest unique commit of this repo, made to identify it among forks and group it with other repositories hosted elsewhere that may represent essentially the same project. In most cases it will be the root commit of a repository. In case of a permanent fork between two projects, then the first commit after the fork should be used. | ||
| 31 | 35 | ||
| 32 | Except `d`, all tags are optional. | 36 | Except `d`, all tags are optional. |
| 33 | 37 | ||
| @@ -35,23 +39,30 @@ Except `d`, all tags are optional. | |||
| 35 | 39 | ||
| 36 | 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. | 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. |
| 37 | 41 | ||
| 42 | Patches in a patch set SHOULD include a NIP-10 `e` `reply` tag pointing to the previous patch. | ||
| 43 | |||
| 44 | The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` to the original root patch. | ||
| 45 | |||
| 38 | ```jsonc | 46 | ```jsonc |
| 39 | { | 47 | { |
| 40 | "kind": 1617, | 48 | "kind": 1617, |
| 41 | "content": "<patch>", // contents of <git format-patch> | 49 | "content": "<patch>", // contents of <git format-patch> |
| 42 | "tags": [ | 50 | "tags": [ |
| 43 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], | 51 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], |
| 52 | ["r", "<earliest-unique-commit-id-of-repo>"] // so clients can subscribe to all patches sent to a local git repo | ||
| 44 | ["p", "<repository-owner>"], | 53 | ["p", "<repository-owner>"], |
| 45 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention | 54 | ["p", "<other-user>"], // optionally send the patch to another user to bring it to their attention |
| 46 | 55 | ||
| 47 | // for the first patch in a thread or series | 56 | ["t", "root"], // ommited for additional patches in a series |
| 48 | ["t", "root"], | 57 | // for the first patch in a revision |
| 58 | ["t", "root-revision"], | ||
| 49 | 59 | ||
| 50 | // optional tags for when it is desirable that the merged patch has a stable commit id | 60 | // optional tags for when it is desirable that the merged patch has a stable commit id |
| 51 | // these fields are necessary for ensuring that the commit resulting from applying a patch | 61 | // these fields are necessary for ensuring that the commit resulting from applying a patch |
| 52 | // has the same id as it had in the proposer's machine -- all these tags can be omitted | 62 | // has the same id as it had in the proposer's machine -- all these tags can be omitted |
| 53 | // if the maintainer doesn't care about these things | 63 | // if the maintainer doesn't care about these things |
| 54 | ["commit", "<current-commit-id>"], | 64 | ["commit", "<current-commit-id>"], |
| 65 | ["r", "<current-commit-id>"] // so clients can find existing patches for a specific commit | ||
| 55 | ["parent-commit", "<parent-commit-id>"], | 66 | ["parent-commit", "<parent-commit-id>"], |
| 56 | ["commit-pgp-sig", "-----BEGIN PGP SIGNATURE-----..."], // empty string for unsigned commit | 67 | ["commit-pgp-sig", "-----BEGIN PGP SIGNATURE-----..."], // empty string for unsigned commit |
| 57 | ["committer", "<name>", "<email>", "<timestamp>", "<timezone offset in minutes>"], | 68 | ["committer", "<name>", "<email>", "<timestamp>", "<timezone offset in minutes>"], |
| @@ -59,6 +70,8 @@ Patches can be sent by anyone to any repository. Patches to a specific repositor | |||
| 59 | } | 70 | } |
| 60 | ``` | 71 | ``` |
| 61 | 72 | ||
| 73 | The first patch in a series MAY be a cover letter in the format produced by `git format-patch`. | ||
| 74 | |||
| 62 | ## Issues | 75 | ## Issues |
| 63 | 76 | ||
| 64 | 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. | 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. |
| @@ -94,9 +107,46 @@ Replies are also Markdown text. The difference is that they MUST be issued as re | |||
| 94 | } | 107 | } |
| 95 | ``` | 108 | ``` |
| 96 | 109 | ||
| 110 | ## Status | ||
| 111 | |||
| 112 | Root Patches and Issues have a Status that defaults to 'Open' and can be set by issuing Status events. | ||
| 113 | |||
| 114 | ```jsonc | ||
| 115 | { | ||
| 116 | "kind": 1630, // Open | ||
| 117 | "kind": 1631, // Applied / Merged for Patches; Resolved for Issues | ||
| 118 | "kind": 1632, // Closed | ||
| 119 | "kind": 1633, // Draft | ||
| 120 | "content": "<markdown text>", | ||
| 121 | "tags": [ | ||
| 122 | ["e", "<issue-or-original-root-patch-id-hex>", "", "root"], | ||
| 123 | ["e", "<accepted-revision-root-id-hex>", "", "reply"], // for when revisions applied | ||
| 124 | ["p", "<repository-owner>"], | ||
| 125 | ["p", "<root-event-author>"], | ||
| 126 | ["p", "<revision-author>"], | ||
| 127 | |||
| 128 | // optional for improved subscription filter efficiency | ||
| 129 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>", "<relay-url>"], | ||
| 130 | ["r", "<earliest-unique-commit-id-of-repo>"] | ||
| 131 | |||
| 132 | // optional for `1631` status | ||
| 133 | ["e", "<applied-or-merged-patch-event-id>", "", "mention"], // for each | ||
| 134 | // when merged | ||
| 135 | ["merge-commit", "<merge-commit-id>"] | ||
| 136 | ["r", "<merge-commit-id>"] | ||
| 137 | // when applied | ||
| 138 | ["applied-as-commits", "<commit-id-in-master-branch>", ...] | ||
| 139 | ["r", "<applied-commit-id>"] // for each | ||
| 140 | ] | ||
| 141 | } | ||
| 142 | ``` | ||
| 143 | |||
| 144 | The Status event with the largest created_at date is valid. | ||
| 145 | |||
| 146 | The Status of a patch-revision defaults to either that of the root-patch, or `1632` (Closed) if the root-patch's Status is `1631` and the patch-revision isn't tagged in the `1631` event. | ||
| 147 | |||
| 148 | |||
| 97 | ## Possible things to be added later | 149 | ## Possible things to be added later |
| 98 | 150 | ||
| 99 | - "status" kind (for letting people know a patch was merged or an issue was fixed or won't be fixed) | ||
| 100 | - "branch merge" kind (specifying a URL from where to fetch the branch to be merged) | 151 | - "branch merge" kind (specifying a URL from where to fetch the branch to be merged) |
| 101 | - "cover letter" kind (to which multiple patches can refer and serve as a unifying layer to them) | ||
| 102 | - inline file comments kind (we probably need one for patches and a different one for merged files) | 152 | - inline file comments kind (we probably need one for patches and a different one for merged files) |