MCPcopy Create free account
hub / github.com/ReviewStage/stage-cli / readOriginUrl

Function readOriginUrl

packages/cli/src/git.ts:41–51  ·  view source on GitHub ↗
(repoRoot: string)

Source from the content-addressed store, hash-verified

39}
40
41function readOriginUrl(repoRoot: string): string | null {
42 try {
43 const out = execFileSync("git", ["-C", repoRoot, "remote", "get-url", "origin"], {
44 encoding: "utf8",
45 stdio: ["ignore", "pipe", "ignore"],
46 }).trim();
47 return out || null;
48 } catch {
49 return null;
50 }
51}
52
53/** Configured `user.name` for the repo, or null when unset. Used as a viewer-identity fallback. */
54export function readGitUserName(repoRoot: string): string | null {

Callers 1

readRepoContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected