mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Implement getNostrRemoteInfo simple version
This commit is contained in:
1 file changed
+20
-2
+20
-2
@@ -640,9 +640,27 @@ export class Git {
|
||||
refs: Record<string, string>;
|
||||
HEAD?: string;
|
||||
}> {
|
||||
// TODO: implement Nostr remote info retrieval
|
||||
}
|
||||
const capabilities = ['symrefs', 'fetch', 'push'];
|
||||
const refs: Record<string, string> = {};
|
||||
|
||||
const { state } = await this.fetchRepoEvents(nostrURI);
|
||||
|
||||
if (!state) {
|
||||
return { capabilities, refs };
|
||||
}
|
||||
|
||||
for (const [name, value] of state.tags) {
|
||||
if (name === 'HEAD' || name.startsWith('refs/')) {
|
||||
refs[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
capabilities,
|
||||
refs,
|
||||
HEAD: refs['HEAD'],
|
||||
};
|
||||
}
|
||||
|
||||
private async nostrClone(nostrURI: NostrURI, options: Omit<Parameters<typeof git.clone>[0], 'fs' | 'http' | 'corsProxy'>): Promise<void> {
|
||||
// TODO: implement Nostr clone
|
||||
|
||||
Reference in new issue
Block a user