From 403b5199a490b6a148063003e00924f5e79ba36c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 7 Mar 2024 10:21:06 +0000 Subject: [PATCH] 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 --- 34.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/34.md b/34.md index c6e7225..f72fcf2 100644 --- a/34.md +++ b/34.md @@ -106,8 +106,46 @@ Replies are also Markdown text. The difference is that they MUST be issued as re } ``` +## Status + +Root Patches and Issues have a Status that defaults to 'Open' and can be set by issuing Status events. + +```jsonc +{ + "kind": 1630, // Open + "kind": 1631, // Applied / Merged for Patches; Resolved for Issues + "kind": 1632, // Closed + "kind": 1633, // Draft + "content": "", + "tags": [ + ["e", "", "", "root"], + ["e", "", "", "reply"], // for when revisions applied + ["p", ""], + ["p", ""], + ["p", ""], + + // optional for improved subscription filter efficency + ["a", "30617::", ""], + ["r", ""] + + // optional for `1631` status + ["e", "", "", "mention"], // for each + // when merged + ["merge-commit", ""] + ["r", ""] + // when applied + ["applied-as-commits", "", ...] + ["r", ""] // for each + ] +} +``` + +The Status event with the largest created_at date is valid. + +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. + + ## Possible things to be added later -- "status" kind (for letting people know a patch was merged or an issue was fixed or won't be fixed) - "branch merge" kind (specifying a URL from where to fetch the branch to be merged) - inline file comments kind (we probably need one for patches and a different one for merged files)