MCPcopy Create free account
hub / github.com/Noumena-Network/code / parseSaplingRepoName

Function parseSaplingRepoName

src/utils/citcWorkspaceSource.ts:54–69  ·  view source on GitHub ↗
(contents: string)

Source from the content-addressed store, hash-verified

52}
53
54export function parseSaplingRepoName(contents: string): string | null {
55 const lines = contents.split(/\r?\n/u).map(line => line.trim())
56 const explicitRepoName = lines
57 .find(line => line.startsWith('reponame='))
58 ?.slice('reponame='.length)
59 .trim()
60 if (explicitRepoName) {
61 return explicitRepoName
62 }
63
64 const monoDefault = lines
65 .find(line => line.startsWith('default=mono:'))
66 ?.slice('default=mono:'.length)
67 .trim()
68 return monoDefault || null
69}
70
71export function parseWorkspaceStatus(output: string): {
72 rawWorkspaceName: string | null

Calls

no outgoing calls

Tested by

no test coverage detected