From daf651ccc04ffbaf0635d813600bd75e860a8fcb Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sun, 5 Feb 2023 09:22:48 -0500 Subject: [PATCH 1/8] Rought draft for decentralized source control context. --- draft.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 draft.md diff --git a/draft.md b/draft.md new file mode 100644 index 0000000000..4fe9179f69 --- /dev/null +++ b/draft.md @@ -0,0 +1,48 @@ +NIP-?? +====== + +Source Control Context +---------------------- + +`draft` `optional` `author:garyKrause_` + +This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: ??`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accomodate other source control methodologies. + +## Definition of a Source Control Event + +`kind: ??` uses tag the `b` tag to identify the base repository. The value of this tag SHALL be a list of remote source control repository URLs. These URLs MAY be a nostr relay URL or a traditional repository URL. The first URL in this list SHALL be considered the "default" repository URL for the context. + +The `content` of a Source Control Event MAY contain a text description of the event or other information about the repository. + +```json +{ + ... + "kind": ??, + "tags": [ + ["b", , , ...], + ], + "content": , + ... +``` + +A relay MAY host the repository along side it's nostr database which can be discovered using a standard `REQ` message filtering for `kind: ??`. + +### Merge Requests + +A source control event MAY contain an `m` tag indicating the event is specific to a merge request. If present, the `m` tag SHALL define the branch being merged into and the branch being merged in. An event MAY include the URL of the repository being merged from. This could be included when the URL being merged from is not in the `b` tag of the event or for specificity. When creating a merge request, the `content` field MAY contain a justification/explanation for the merge + +```json +{ + ... + "kind": ??, + "tags": [ + ["b", , , ...], + ["m": , , ], + ], + "content": , + ... +``` + +### Issue/Bug Tracking + +???? \ No newline at end of file From 603f1911a9dd8ae49ec7aec1c84eb7fc5c0e2f55 Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sun, 5 Feb 2023 16:50:40 -0500 Subject: [PATCH 2/8] Add line number tag --- draft.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draft.md b/draft.md index 4fe9179f69..ec16b4e89e 100644 --- a/draft.md +++ b/draft.md @@ -6,7 +6,7 @@ Source Control Context `draft` `optional` `author:garyKrause_` -This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: ??`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accomodate other source control methodologies. +This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: ??`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accommodate other source control methodologies. ## Definition of a Source Control Event @@ -29,7 +29,7 @@ A relay MAY host the repository along side it's nostr database which can be disc ### Merge Requests -A source control event MAY contain an `m` tag indicating the event is specific to a merge request. If present, the `m` tag SHALL define the branch being merged into and the branch being merged in. An event MAY include the URL of the repository being merged from. This could be included when the URL being merged from is not in the `b` tag of the event or for specificity. When creating a merge request, the `content` field MAY contain a justification/explanation for the merge +A source control event MAY contain an `m` tag indicating the event is specific to a merge request. If present, the `m` tag SHALL define the branch being merged into and the branch being merged in. An event MAY include the URL of the repository being merged from. This could be included when the URL being merged from is not in the `b` tag of the event or for specificity. When creating a merge request, the `content` field MAY contain a justification/explanation for the merge. The `l` tag MAY be included with an `m` tag. The `l` tag specifies the relative file path and line number that the event is referencing. ```json { @@ -38,6 +38,7 @@ A source control event MAY contain an `m` tag indicating the event is specific t "tags": [ ["b", , , ...], ["m": , , ], + ["l": , ] ], "content": , ... From f911a99754610650798e7bdedfb6d4a26a4b84ab Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Tue, 14 Feb 2023 18:58:55 -0500 Subject: [PATCH 3/8] Update NIP numbering --- draft.md => 69.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename draft.md => 69.md (92%) diff --git a/draft.md b/69.md similarity index 92% rename from draft.md rename to 69.md index ec16b4e89e..118bffacc3 100644 --- a/draft.md +++ b/69.md @@ -1,4 +1,4 @@ -NIP-?? +NIP-69 ====== Source Control Context @@ -6,18 +6,18 @@ Source Control Context `draft` `optional` `author:garyKrause_` -This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: ??`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accommodate other source control methodologies. +This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: 69`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accommodate other source control methodologies. ## Definition of a Source Control Event -`kind: ??` uses tag the `b` tag to identify the base repository. The value of this tag SHALL be a list of remote source control repository URLs. These URLs MAY be a nostr relay URL or a traditional repository URL. The first URL in this list SHALL be considered the "default" repository URL for the context. +`kind: 69` uses tag the `b` tag to identify the base repository. The value of this tag SHALL be a list of remote source control repository URLs. These URLs MAY be a nostr relay URL or a traditional repository URL. The first URL in this list SHALL be considered the "default" repository URL for the context. The `content` of a Source Control Event MAY contain a text description of the event or other information about the repository. ```json { ... - "kind": ??, + "kind": 69, "tags": [ ["b", , , ...], ], @@ -25,7 +25,7 @@ The `content` of a Source Control Event MAY contain a text description of the ev ... ``` -A relay MAY host the repository along side it's nostr database which can be discovered using a standard `REQ` message filtering for `kind: ??`. +A relay MAY host the repository along side it's nostr database which can be discovered using a standard `REQ` message filtering for `kind: 69`. ### Merge Requests @@ -34,7 +34,7 @@ A source control event MAY contain an `m` tag indicating the event is specific t ```json { ... - "kind": ??, + "kind": 69, "tags": [ ["b", , , ...], ["m": , , ], From ac80fdb755480544d62e499e7c91d777997bc9d6 Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Tue, 14 Feb 2023 19:03:02 -0500 Subject: [PATCH 4/8] MUST have content for the event so clients have something to display. --- 69.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/69.md b/69.md index 118bffacc3..3df48d705e 100644 --- a/69.md +++ b/69.md @@ -12,7 +12,7 @@ This NIP defines ways source control (git, etc.) context can be stored using nos `kind: 69` uses tag the `b` tag to identify the base repository. The value of this tag SHALL be a list of remote source control repository URLs. These URLs MAY be a nostr relay URL or a traditional repository URL. The first URL in this list SHALL be considered the "default" repository URL for the context. -The `content` of a Source Control Event MAY contain a text description of the event or other information about the repository. +The `content` of a Source Control Event MUST contain a text description or summary of the base repository. This enables clients that don't specifically handle this kind to display meaningful text in their UI. ```json { @@ -21,7 +21,7 @@ The `content` of a Source Control Event MAY contain a text description of the ev "tags": [ ["b", , , ...], ], - "content": , + "content": , ... ``` From 1bb4fa0a47a1a4caa02f88bc089e6d9ffd93bf4f Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sat, 4 Mar 2023 11:32:34 -0500 Subject: [PATCH 5/8] be more specific and git native --- 69.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/69.md b/69.md index 3df48d705e..6ab836f6f5 100644 --- a/69.md +++ b/69.md @@ -36,8 +36,8 @@ A source control event MAY contain an `m` tag indicating the event is specific t ... "kind": 69, "tags": [ - ["b", , , ...], - ["m": , , ], + ["b", , , ...], + ["m": , , ], ["l": , ] ], "content": , From 2a6074eb8789a376107374086f81c7dcc10e6a48 Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sat, 4 Mar 2023 11:40:07 -0500 Subject: [PATCH 6/8] Remove unneeded implementation detail description. --- 69.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/69.md b/69.md index 6ab836f6f5..5aeeb2e053 100644 --- a/69.md +++ b/69.md @@ -25,8 +25,6 @@ The `content` of a Source Control Event MUST contain a text description or summa ... ``` -A relay MAY host the repository along side it's nostr database which can be discovered using a standard `REQ` message filtering for `kind: 69`. - ### Merge Requests A source control event MAY contain an `m` tag indicating the event is specific to a merge request. If present, the `m` tag SHALL define the branch being merged into and the branch being merged in. An event MAY include the URL of the repository being merged from. This could be included when the URL being merged from is not in the `b` tag of the event or for specificity. When creating a merge request, the `content` field MAY contain a justification/explanation for the merge. The `l` tag MAY be included with an `m` tag. The `l` tag specifies the relative file path and line number that the event is referencing. From 37a180f43354915ce6efcdb2f835c178825284a7 Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sat, 4 Mar 2023 11:41:09 -0500 Subject: [PATCH 7/8] Add OpenSourceOptimist as author due to contributions. --- 69.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/69.md b/69.md index 5aeeb2e053..b1e6af681c 100644 --- a/69.md +++ b/69.md @@ -4,7 +4,7 @@ NIP-69 Source Control Context ---------------------- -`draft` `optional` `author:garyKrause_` +`draft` `optional` `author:garyKrause_` `author: OpenSourceOptimist` This NIP defines ways source control (git, etc.) context can be stored using nostr. Git is already decentralized, but the contexts around a git repository are largely centralized (PR comments, issue tracking, releases, etc). With the correct approach a nostr relay could store this context using many of the existing NIPs. This NIP defines a new kind, `kind: 69`, to represent a source control repository. This NIP purposely does not indicate git as a requirement but many of the concepts will be based around git methods of source control. The author hopes that the NIP is flexible enough to accommodate other source control methodologies. From 0ef5a454fa16ca3ed5da32bce4537decbbeb2c00 Mon Sep 17 00:00:00 2001 From: Gary R Krause Date: Sat, 4 Mar 2023 11:50:32 -0500 Subject: [PATCH 8/8] Update other b tag --- 69.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/69.md b/69.md index b1e6af681c..24c3b17695 100644 --- a/69.md +++ b/69.md @@ -19,7 +19,7 @@ The `content` of a Source Control Event MUST contain a text description or summa ... "kind": 69, "tags": [ - ["b", , , ...], + ["b", , , ...], ], "content": , ...