(path: string)
| 285 | } |
| 286 | |
| 287 | export const getOriginUrl = async (path: string) => { |
| 288 | const git = createGitClientForPath(path); |
| 289 | |
| 290 | try { |
| 291 | const remotes = await git.getConfig('remote.origin.url', GitConfigScope.local); |
| 292 | return remotes.value; |
| 293 | } catch (error: unknown) { |
| 294 | if (error instanceof Error) { |
| 295 | throw new Error(`Failed to get origin for ${path}: ${error.message}`); |
| 296 | } else { |
| 297 | throw new Error(`Failed to get origin for ${path}: ${error}`); |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | const parseRefNames = (refs: string) => |
| 303 | refs |
no test coverage detected