Create or Update Repository Announcement

{#if !nip07Available}

NIP-07 browser extension is required to sign repository announcements.

Please install a Nostr browser extension (like Alby, nos2x, or similar).

{/if} {#if error}
{error}
{/if} {#if success}
Repository announcement published successfully! Redirecting...
{/if}
{ e.preventDefault(); submit(); }}>
{#if lookupError['repo-existingRepoRef']}
{lookupError['repo-existingRepoRef']}
{/if} {#if lookupResults['repo-existingRepoRef']}
Found {lookupResults['repo-existingRepoRef'].length} repository announcement(s):
{#each (lookupResults['repo-existingRepoRef'] || []) as result} {#if 'tags' in result} {@const event = result as NostrEvent} {@const nameTag = event.tags.find((t: string[]) => t[0] === 'name')?.[1]} {@const dTag = event.tags.find((t: string[]) => t[0] === 'd')?.[1]} {@const descTag = event.tags.find((t: string[]) => t[0] === 'description')?.[1]} {@const imageTag = event.tags.find((t: string[]) => t[0] === 'image')?.[1]} {@const ownerNpub = nip19.npubEncode(event.pubkey)} {@const tags = event.tags.filter((t: string[]) => t[0] === 't' && t[1] && t[1] !== 'private' && t[1] !== 'fork').map((t: string[]) => t[1])}
selectRepoResult(event, 'existingRepoRef')} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); selectRepoResult(event, 'existingRepoRef'); } }} >
{#if imageTag} {/if}
{nameTag || dTag || 'Unnamed'} {#if dTag} d-tag: {dTag} {/if} {#if descTag}

{descTag}

{/if}
Owner: {ownerNpub.slice(0, 16)}... Event: {event.id.slice(0, 16)}...
{#if tags.length > 0}
{#each tags as tag} #{tag} {/each}
{/if}
{/if} {/each}
{/if}
Clone URLs {#if ($page.data.gitDomain || 'localhost:6543').startsWith('localhost') || ($page.data.gitDomain || 'localhost:6543').startsWith('127.0.0.1')} Note: Your server is using localhost, which won't work for others. You must add at least one public clone URL (e.g., GitHub, GitLab) or configure a Tor .onion address. {:else} {$page.data.gitDomain || 'localhost:6543'} will be added automatically, but you can add any existing ones here. {/if}
{#each cloneUrls as url, index}
updateCloneUrl(index, e.currentTarget.value)} placeholder="https://github.com/user/repo.git" disabled={loading} /> {#if cloneUrls.length > 1} {/if}
{/each}
Web URLs (optional) Webpage URLs for browsing the repository (e.g., GitHub/GitLab web interface). Hover over a URL to preview it.
{#each webUrls as url, index}
updateWebUrl(index, e.currentTarget.value)} onmouseenter={() => handleWebUrlHover(index, url)} onmouseleave={handleWebUrlLeave} placeholder="https://github.com/user/repo" disabled={loading} /> {#if webUrls.length > 1} {/if} {#if previewingUrlIndex === index && previewUrl} {/if}
{/each}
Maintainers (optional) Other maintainer pubkeys (npub or hex format). Example: npub1abc... or hex pubkey
{#each maintainers as maintainer, index}
updateMaintainer(index, e.currentTarget.value)} placeholder="npub1abc... or hex pubkey" disabled={loading} /> {#if maintainers.length > 1} {/if}
{#if lookupError[`npub-maintainers-${index}`]}
{lookupError[`npub-maintainers-${index}`]}
{/if} {#if lookupResults[`npub-maintainers-${index}`]}
Found {(lookupResults[`npub-maintainers-${index}`] || []).length} profile(s):
{#each (lookupResults[`npub-maintainers-${index}`] || []) as result} {#if 'npub' in result} {@const profile = result as ProfileData}
selectNpubResult(profile, 'maintainers', index)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); selectNpubResult(profile, 'maintainers', index); } }} >
{#if profile.picture} {:else}
{(profile.name || profile.npub).slice(0, 2).toUpperCase()}
{/if}
{profile.name || 'Unknown'} {#if profile.about}

{profile.about}

{/if} {profile.npub}
{/if} {/each}
{/if} {/each}
Relays (optional) Nostr relays that this repository will monitor for patches and issues. Default relays will be added automatically.
{#each relays as relay, index}
updateRelay(index, e.currentTarget.value)} placeholder="wss://relay.example.com" disabled={loading} /> {#if relays.length > 1} {/if}
{/each}
Blossoms (optional) Blossom URLs for this repository. These are preserved but not actively used by GitRepublic.
{#each blossoms as blossom, index}
updateBlossom(index, e.currentTarget.value)} placeholder="https://example.com" disabled={loading} /> {#if blossoms.length > 1} {/if}
{/each}
Tags/Labels (optional) Hashtags or labels for the repository. Examples: "javascript", "web-app", "personal-fork" (indicates author isn't a maintainer)
{#each tags as tag, index}
updateTag(index, e.currentTarget.value)} placeholder="javascript" disabled={loading} /> {#if tags.length > 1} {/if}
{/each}
Documentation (optional) Documentation event addresses (naddr format). Example: 30818:fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1:nkbip-01
{#each documentation as doc, index}
updateDocumentation(index, e.currentTarget.value)} placeholder="30818:pubkey:d-tag" disabled={loading} /> {#if documentation.length > 1} {/if}
{/each}
{#if isFork}
{#if lookupError['repo-forkOriginalRepo']}
{lookupError['repo-forkOriginalRepo']}
{/if} {#if lookupResults['repo-forkOriginalRepo']}
Found {lookupResults['repo-forkOriginalRepo'].length} repository announcement(s):
{#each (lookupResults['repo-forkOriginalRepo'] || []) as result} {#if 'tags' in result} {@const event = result as NostrEvent} {@const nameTag = event.tags.find((t: string[]) => t[0] === 'name')?.[1]} {@const dTag = event.tags.find((t: string[]) => t[0] === 'd')?.[1]} {@const descTag = event.tags.find((t: string[]) => t[0] === 'description')?.[1]} {@const imageTag = event.tags.find((t: string[]) => t[0] === 'image')?.[1]} {@const ownerNpub = nip19.npubEncode(event.pubkey)} {@const tags = event.tags.filter((t: string[]) => t[0] === 't' && t[1] && t[1] !== 'private' && t[1] !== 'fork').map((t: string[]) => t[1])}
selectRepoResult(event, 'forkOriginalRepo')} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); selectRepoResult(event, 'forkOriginalRepo'); } }} >
{#if imageTag} {/if}
{nameTag || dTag || 'Unnamed'} {#if dTag} d-tag: {dTag} {/if} {#if descTag}

{descTag}

{/if}
Owner: {ownerNpub.slice(0, 16)}... Event: {event.id.slice(0, 16)}...
{#if tags.length > 0}
{#each tags as tag} #{tag} {/each}
{/if}
{/if} {/each}
{/if}
{/if}
Cancel