mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Allow editing t-tags on Nostr repos
This commit is contained in:
4 files changed
+492
-1
No files matched your search
@@ -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']);
|
||||
|
||||
Reference in new issue
Block a user