(contents: string)
| 52 | } |
| 53 | |
| 54 | export 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 | |
| 71 | export function parseWorkspaceStatus(output: string): { |
| 72 | rawWorkspaceName: string | null |
no outgoing calls
no test coverage detected