Allow editing t-tags on Nostr repos

This commit is contained in:
Alex Gleason committed 2025-12-03 16:40:01 -06:00
1 parent a2ffc7bf9c
commit 6f94aaa45e
4 files changed
+492 -1

No files matched your search

+10
View File
@@ -15,6 +15,8 @@ export interface RepositoryAnnouncementData {
cloneUrls: string[];
/** Relays for patch submissions */
relays?: string[];
/** Category tags for the repository */
tTags?: string[];
/** Earliest unique commit (root commit) */
earliestCommit?: string;
}
@@ -95,6 +97,14 @@ export function createRepositoryAnnouncementEvent(
}
}
// Add t-tags for categorization (each as a separate tag for relay-level filtering)
if (data.tTags && data.tTags.length > 0) {
const trimmedTags = data.tTags.map(tag => tag.trim().toLowerCase()).filter(tag => tag);
for (const tag of trimmedTags) {
tags.push(['t', tag]);
}
}
// Add earliest unique commit (euc) for repository identification
if (data.earliestCommit?.trim()) {
tags.push(['r', data.earliestCommit.trim(), 'euc']);