diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-07 10:21:06 +0000 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2024-04-17 17:46:34 -0300 |
| commit | 403b5199a490b6a148063003e00924f5e79ba36c (patch) | |
| tree | 4035984cc8921780a66338112c1f5018dac4ed06 | |
| parent | 0b62729e318497922822c39471ab31a869563ba5 (diff) | |
NIP-34: add status events
merge-commit and applied-commit-id tags enable discussion of patches to be
mapped to lines of code accepted into the master branch
| -rw-r--r-- | 34.md | 40 |
1 files changed, 39 insertions, 1 deletions
| @@ -106,8 +106,46 @@ Replies are also Markdown text. The difference is that they MUST be issued as re | |||
| 106 | } | 106 | } |
| 107 | ``` | 107 | ``` |
| 108 | 108 | ||
| 109 | ## Status | ||
| 110 | |||
| 111 | Root Patches and Issues have a Status that defaults to 'Open' and can be set by issuing Status events. | ||
| 112 | |||
| 113 | ```jsonc | ||
| 114 | { | ||
| 115 | "kind": 1630, // Open | ||
| 116 | "kind": 1631, // Applied / Merged for Patches; Resolved for Issues | ||
| 117 | "kind": 1632, // Closed | ||
| 118 | "kind": 1633, // Draft | ||
| 119 | "content": "<markdown text>", | ||
| 120 | "tags": [ | ||
| 121 | ["e", "<issue-or-original-root-patch-id-hex>", "", "root"], | ||
| 122 | ["e", "<accepted-revision-root-id-hex>", "", "reply"], // for when revisions applied | ||
| 123 | ["p", "<repository-owner>"], | ||
| 124 | ["p", "<root-event-author>"], | ||
| 125 | ["p", "<revision-author>"], | ||
| 126 | |||
| 127 | // optional for improved subscription filter efficency | ||
| 128 | ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>", "<relay-url>"], | ||
| 129 | ["r", "<earliest-unique-commit-id-of-repo>"] | ||
| 130 | |||
| 131 | // optional for `1631` status | ||
| 132 | ["e", "<applied-or-merged-patch-event-id>", "", "mention"], // for each | ||
| 133 | // when merged | ||
| 134 | ["merge-commit", "<merge-commit-id>"] | ||
| 135 | ["r", "<merge-commit-id>"] | ||
| 136 | // when applied | ||
| 137 | ["applied-as-commits", "<commit-id-in-master-branch>", ...] | ||
| 138 | ["r", "<applied-commit-id>"] // for each | ||
| 139 | ] | ||
| 140 | } | ||
| 141 | ``` | ||
| 142 | |||
| 143 | The Status event with the largest created_at date is valid. | ||
| 144 | |||
| 145 | 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. | ||
| 146 | |||
| 147 | |||
| 109 | ## Possible things to be added later | 148 | ## Possible things to be added later |
| 110 | 149 | ||
| 111 | - "status" kind (for letting people know a patch was merged or an issue was fixed or won't be fixed) | ||
| 112 | - "branch merge" kind (specifying a URL from where to fetch the branch to be merged) | 150 | - "branch merge" kind (specifying a URL from where to fetch the branch to be merged) |
| 113 | - inline file comments kind (we probably need one for patches and a different one for merged files) | 151 | - inline file comments kind (we probably need one for patches and a different one for merged files) |