MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / getRepoName

Function getRepoName

devctx/src/core/git.ts:10–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8}
9
10export async function getRepoName(): Promise<string> {
11 const remote = await git.remote(["get-url", "origin"]).catch(() => null);
12 if (remote) {
13 const name = remote.trim().split("/").pop()?.replace(".git", "") || "unknown";
14 return name;
15 }
16 const root = await git.revparse(["--show-toplevel"]);
17 return root.trim().split("/").pop() || "unknown";
18}
19
20export async function getChangedFiles(): Promise<string[]> {
21 const status = await git.status();

Callers 6

mcp-server.tsFile · 0.90
watchCommandFunction · 0.90
saveCommandFunction · 0.90
summarizeCommandFunction · 0.90
initCommandFunction · 0.90
handoffCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected