MCPcopy Create free account
hub / github.com/continuedev/continue / getRepoName

Method getRepoName

extensions/vscode/src/VsCodeIde.ts:167–183  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

165 };
166
167 async getRepoName(dir: string): Promise<string | undefined> {
168 const repo = await this.getRepo(dir);
169 const remotes = repo?.state.remotes;
170 if (!remotes) {
171 return undefined;
172 }
173 const remote =
174 remotes?.find((r: any) => r.name === "origin") ?? remotes?.[0];
175 if (!remote) {
176 return undefined;
177 }
178 const ownerAndRepo = remote.fetchUrl
179 ?.replace(".git", "")
180 .split("/")
181 .slice(-2);
182 return ownerAndRepo?.join("/");
183 }
184
185 async getTags(artifactId: string): Promise<IndexTag[]> {
186 const workspaceDirs = await this.getWorkspaceDirs();

Callers

nothing calls this directly

Calls 2

getRepoMethod · 0.95
replaceMethod · 0.45

Tested by

no test coverage detected