Fix Nostr git URL format and npub decoding

- Change URL format from `nostr://<npub>/<domain>/<repo>` to `nostr://<hex-pubkey>/<repo-id>`
- Auto-convert npub to hex pubkey in URL parsing
- Fix hanging issue caused by invalid pubkey format in repository queries
- Update parseRepoUrl in types.ts to handle npub decoding
- Update PullRequestDialog to decode npub before querying
- Update NOSTR_GIT.md with correct URL format examples

The correct format is:
- `nostr://<hex-pubkey>/<repo-id>` (preferred)
- `nostr://<npub>/<repo-id>` (auto-converted to hex)

Fixes the issue where patch publishing would hang indefinitely when trying to query repositories with npub-formatted URLs.
This commit is contained in:
shakespeare.diy committed 2025-10-14 23:49:39 -05:00
1 parent c364b3f796
commit 5047d95cf4
4 files changed
+52 -9

No files matched your search

+2 -1
View File
@@ -424,7 +424,8 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
});
// Set origin remote to Nostr URL
const nostrUrl = `nostr://${nip19.npubEncode(user.pubkey)}/git.shakespeare.diy/${projectId}`;
// Format: nostr://<hex-pubkey>/<repo-id>
const nostrUrl = `nostr://${user.pubkey}/${projectId}`;
try {
// Remove existing origin if it exists