DanConwayDev on Nostr: 2. Ah, I hadn't considered that the maintainer may want to express a view on whether ...
2. Ah, I hadn't considered that the maintainer may want to express a view on whether contributors should use the nip05 or npub in the clone url. I planned on it being a user preference and hadn't landed on a default for gitworkshop.dev. Now we are on the topic of maintainers expressing a view, it's also conceivable that projects may want to suggest a generic project nip05 which may point to different maintainers over time as the project evolves. Increasing reliance on DNS just feels a bit dirty and unsatisfactory, but I can see the easier UX. Why don't we start off by adding basic support first, without adding anything to `30317`, and see what the feedback is like?
3. I'm not sure that we do. I've created this to demonstrate why not:
Following the discussion: nevent1q…hvk2 I've pulled this together to demonstrate how this feature could be added to `NostrUrlDecoded` without dramatically changing its structure or adding a similar struct which omits the `PublicKey`.
it replaces `NostrUrlDecoded::from_str` with `NostrUrlDecoded::parse_and_resolve`.
In this WIP I have began to add nip05 to repo_ref so that `RepoRef::to_nostr_git_url` can render the nip05 when originally used. Unfortunately, there is more work to as the type of `trusted_maintainer` needs to change to `NostrUrlDecoded`.
There may still be instances where the variable name `repo_coordinate` is used to create repo_refs when it is exclusively refering to trusted maintainers and not other repo maintainers. these should use the type `NostrUrlDecoded` too, to ensure `RepoRef::to_nostr_git_url` always includes nip05 when originally taken from the nostr_url. --- src/bin/git_remote_nostr/main.rs | 12 ++++++------ src/bin/ngit/sub_commands/init.rs | 11 +++++++---- src/lib/git/nostr_url.rs | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- src/lib/repo_ref.rs | 19 +++++++++++++++---- 4 files changed, 100 insertions(+), 23 deletions(-)
{
"id":"119b441b31a168c8bf87f2b8f0fe4c57ae1d4122c7c81ef6e414eefb59afbe30",
"pubkey":"a008def15796fba9a0d6fab04e8fd57089285d9fd505da5a83fe8aad57a3564d",
"created_at":1733737818,
"kind":1,
"tags": [
[
"e",
"29b2f4810dae7bf293e4da03c66204e090c2286441ddbf80ed5f76488d66b554",
"wss://relay.damus.io",
"root"
],
[
"e",
"9568dc881e6aec4912a7cf6838955405def17ddce1e3e26de519e9e063b34ab7",
"wss://relay.damus.io",
"reply"
],
[
"r",
"26689f97810fc656c7134c76e2a37d33b2e40ce7"
],
[
"a",
"30617:a008def15796fba9a0d6fab04e8fd57089285d9fd505da5a83fe8aad57a3564d:ngit"
],
[
"p",
"cfd7df62799a22e384a4ab5da8c4026c875b119d0f47c2716b20cdac9cc1f1a6",
"wss://nos.lol/"
],
[
"e",
"5c30e1ecbb8bc4ae455a934a2e129d47e55b0a40ef92d7ae3694e714ba4d69cd",
"wss://nos.lol/",
"mention"
],
[
"p",
"a008def15796fba9a0d6fab04e8fd57089285d9fd505da5a83fe8aad57a3564d"
]
],
"content":"2. Ah, I hadn't considered that the maintainer may want to express a view on whether contributors should use the nip05 or npub in the clone url.\nI planned on it being a user preference and hadn't landed on a default for gitworkshop.dev.\nNow we are on the topic of maintainers expressing a view, it's also conceivable that projects may want to suggest a generic project nip05 which may point to different maintainers over time as the project evolves.\nIncreasing reliance on DNS just feels a bit dirty and unsatisfactory, but I can see the easier UX.\nWhy don't we start off by adding basic support first, without adding anything to `30317`, and see what the feedback is like?\n\n3. I'm not sure that we do. I've created this to demonstrate why not:\nnostr:nevent1qvzqqqqx2ypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy88wumn8ghj7mn0wvhxcmmv9uq3wamnwvaz7tmjv4kxz7fwdehhxarj9e3xzmny9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcppemhxue69uhkummn9ekx7mp0qythwumn8ghj7un9d3shjtnwdaehgu3wvfskuep0qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qgwwaehxw309ahx7uewd3hkctcpzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsqgzuxrs7ewutcjhy2k5nfghp9828u4ds5s80jtt6ud55uu2t5ntfe53rrwl2",
"sig":"e7f57ecd547e75fdd24416dcb688a7fd3757ba14a65137daa5fbba73d3965fc76c2ea61f6a534c0d10989a49d6eef5568055c7ded83623c4454dec007aadeba1"
}