MCPcopy Create free account
hub / github.com/lerna/lerna / parseGitRepo

Function parseGitRepo

libs/core/src/lib/scm-clients/github/create-github-client.ts:44–64  ·  view source on GitHub ↗
(remote = "origin", opts?: any)

Source from the content-addressed store, hash-verified

42}
43
44export function parseGitRepo(remote = "origin", opts?: any) {
45 // TODO: refactor based on TS feedback
46 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
47 // @ts-ignore
48 log.silly("parseGitRepo");
49
50 const args = ["config", "--get", `remote.${remote}.url`];
51
52 // TODO: refactor based on TS feedback
53 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
54 // @ts-ignore
55 log.verbose("git", args);
56
57 const url = childProcess.execSync("git", args, opts);
58
59 if (!url) {
60 throw new ValidationError("", `Git remote URL could not be found using "${remote}".`);
61 }
62
63 return parseGitUrl(url);
64}

Callers 2

createReleaseFunction · 0.90

Calls 1

execSyncMethod · 0.80

Tested by

no test coverage detected