You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 34.md
+84-8Lines changed: 84 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This NIP defines all the ways code collaboration using and adjacent to [`git`](h
10
10
11
11
## Repository announcements
12
12
13
-
Git repositories are hosted in Git-enabled servers, but their existence can be announced using Nostr events, as well as their willingness to receive patches, bug reports and comments in general.
13
+
Git repositories are hosted in Git-enabled servers, but their existence can be announced using Nostr events. By doing so the author asserts themselves as a maintainer and expresses a willingness to receive patches, bug reports and comments in general, unless `t` tag `personal-fork` is included.
14
14
15
15
```jsonc
16
16
{
@@ -25,6 +25,7 @@ Git repositories are hosted in Git-enabled servers, but their existence can be a
25
25
["relays", "<relay-url>", ...], // relays that this repository will monitor for patches and issues
["t","personal-fork"], // optionally indicate author isn't a maintainer
28
29
["t", "<arbitrary string>"], // hashtags labelling the repository
29
30
]
30
31
}
@@ -66,9 +67,13 @@ The `refs` tag can be optionally extended to enable clients to identify how many
66
67
}
67
68
```
68
69
69
-
## Patches
70
+
## Patches and Pull Requests (PRs)
70
71
71
-
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.
72
+
Patches and PRs can be sent by anyone to any repository. Patches and PRs to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch and PR events SHOULD include an `a` tag pointing to that repository's announcement address.
73
+
74
+
Patches SHOULD be used if each event is under 60kb, otherwise PRs SHOULD be used.
75
+
76
+
### Patches
72
77
73
78
Patches in a patch set SHOULD include a [NIP-10](10.md)`e``reply` tag pointing to the previous patch.
74
79
@@ -103,9 +108,66 @@ The first patch revision in a patch revision SHOULD include a [NIP-10](10.md) `e
103
108
104
109
The first patch in a series MAY be a cover letter in the format produced by `git format-patch`.
105
110
111
+
### Pull Requests
112
+
113
+
The PR or PR update tip SHOULD be successfully pushed to `refs/nostr/<[PR|PR-Update]-event-id>` in all repositories listed in its `clone` tag before the event is signed.
114
+
115
+
An attempt SHOULD be made to push this ref to all repositories listed in the repository's announcement event's `"clone"` tag, for which their is reason to believe the user might have write access. This includes each [grasp server](https://njump.me/naddr1qvzqqqrhnypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy28wumn8ghj7un9d3shjtnwva5hgtnyv4mqqpt8wfshxuqlnvh8x) which can be identified using this method: `clone` tag includes `[http|https]://<grasp-path>/<valid-npub>/<string>.git` and `relays` tag includes `[ws/wss]://<grasp-path>`.
116
+
117
+
Clients MAY fallback to creating a 'personal-fork' `repository announcement` listing other grasp servers, e.g. from the `User grasp list`, for the purpose of serving the specified commit(s).
["r", "<earliest-unique-commit-id-of-repo>"] // so clients can subscribe to all PRs sent to a local git repo
154
+
["p", "<repository-owner>"],
155
+
["p", "<other-user>"], // optionally send the PR to another user to bring it to their attention
156
+
157
+
// NIP-22 tags
158
+
["E", "<pull-request-event-id>"],
159
+
["P", "<pull-request-author>"],
160
+
161
+
["c", "<current-commit-id>"], // updated tip of PR
162
+
["clone", "<clone-url>", ...], // at least one git clone url where commit can be downloaded
163
+
["merge-base", "<commit-id>"], // optional: the most recent common ancestor with the target branch
164
+
]
165
+
}
166
+
```
167
+
106
168
## Issues
107
169
108
-
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.
170
+
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.
109
171
110
172
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.
111
173
@@ -125,11 +187,11 @@ Issues may have a `subject` tag, which clients can utilize to display a header.
125
187
126
188
## Replies
127
189
128
-
Replies to either a `kind:1621` (_issue_) or a `kind:1617` (_patch_) event should follow [NIP-22 comment](22.md).
190
+
Replies to either a `kind:1621` (_issue_), `kind:1617` (_patch_) or `kind:1618` (_pull request_) event should follow [NIP-22 comment](22.md).
129
191
130
192
## Status
131
193
132
-
Root Patches and Issues have a Status that defaults to 'Open' and can be set by issuing Status events.
194
+
Root Patches, PRs and Issues have a Status that defaults to 'Open' and can be set by issuing Status events.
133
195
134
196
```jsonc
135
197
{
@@ -139,7 +201,7 @@ Root Patches and Issues have a Status that defaults to 'Open' and can be set by
["e", "<accepted-revision-root-id-hex>", "", "reply"], // for when revisions applied
144
206
["p", "<repository-owner>"],
145
207
["p", "<root-event-author>"],
@@ -165,8 +227,22 @@ The most recent Status event (by `created_at` date) from either the issue/patch
165
227
166
228
The Status of a patch-revision is to either that of the root-patch, or `1632` (_Closed_) if the root-patch's Status is `1631` (_Applied/Merged_) and the patch-revision isn't tagged in the `1631` (_Applied/Merged_) event.
167
229
230
+
## User grasp list
231
+
232
+
List of [grasp servers](https://njump.me/naddr1qvzqqqrhnypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy28wumn8ghj7un9d3shjtnwva5hgtnyv4mqqpt8wfshxuqlnvh8x) the user generally wishes to use for NIP-34 related activity. It is similar in function to the NIP-65 relay list and NIP-B7 blossom list.
233
+
234
+
The event SHOULD include a list of `g` tags with grasp service websocket URLs in order of preference.
235
+
236
+
```jsonc
237
+
{
238
+
"kind":10317,
239
+
"content":"",
240
+
"tags": [
241
+
["g", "<grasp-service-websocket-url>"], // zero or more grasp sever urls
242
+
]
243
+
}
244
+
```
168
245
169
246
## Possible things to be added later
170
247
171
-
- "branch merge" kind (specifying a URL from where to fetch the branch to be merged)
172
248
- inline file comments kind (we probably need one for patches and a different one for merged files)
A blanked `.content`means this draft has been deleted by a client but relays still have the event.
28
+
A blanked `.content`field signals that the draft has been deleted.
30
29
31
-
Tags `e` and `a` identify one or more anchor events, such as parent events on replies.
30
+
[NIP-40](40.md)`expiration` tags are recommended.
31
+
32
+
Clients SHOULD publish kind `31234` events to relays listed on kind `10013` below.
32
33
33
34
## Relay List for Private Content
34
35
35
-
Kind `10013` indicates the user's preferred relays to store private events like Drafts. The event MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, NIP-44-encrypted to the signer's keys and placed inside the .content of the event.
36
+
Kind `10013` indicates the user's preferred relays to store private events like Draft Wraps.
37
+
38
+
The event MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, [NIP44-encrypted](44.md) to the signer's keys and placed inside the .content of the event.
36
39
37
40
```js
38
41
{
39
42
"kind":10013,
40
43
"tags": [],
41
-
"content":nip44Encrypt(JSON.stringify([
42
-
["relay", "wss://myrelay.mydomain.com"]
43
-
]))
44
+
"content":nip44Encrypt(
45
+
JSON.stringify(
46
+
[
47
+
["relay", "wss://myrelay.mydomain.com"]
48
+
]
49
+
)
50
+
)
44
51
//...other fields
45
52
}
46
53
```
47
54
48
-
Relays listed in this event SHOULD be authed and only allow downloads to events signed by the authed user.
55
+
It's recommended that Private Storage relays SHOULD be [NIP-42](42.md)-authed and only allow downloads of events signed by the authed user.
49
56
50
-
Clients SHOULD publish kind `10013` events to the author's [NIP-65](65.md)`write` relays.
57
+
Clients MUST publish kind `10013` events to the author's [NIP-65](65.md)`write` relays.
Copy file name to clipboardExpand all lines: 45.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,17 @@ Some queries a client may want to execute against connected relays are prohibiti
14
14
15
15
## Filters and return values
16
16
17
-
This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result.
17
+
This NIP defines the verb `COUNT`, which accepts a query id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result.
18
18
19
19
```
20
-
["COUNT", <subscription_id>, <filters JSON>...]
20
+
["COUNT", <query_id>, <filters JSON>...]
21
21
```
22
22
23
23
Counts are returned using a `COUNT` response in the form `{"count": <integer>}`. Relays may use probabilistic counts to reduce compute requirements.
24
24
In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": <integer>, "approximate": <true|false>}`.
0 commit comments