MCPcopy
hub / github.com/anomalyco/opencode / getAppInfo

Function getAppInfo

packages/opencode/src/cli/cmd/github.handler.ts:208–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 async function getAppInfo() {
209 const project = ctx.project
210 if (project.vcs !== "git") {
211 prompts.log.error(`Could not find git repository. Please run this command from a git repository.`)
212 throw new UI.CancelledError()
213 }
214
215 // Get repo info
216 const info = await Effect.runPromise(gitSvc.run(["remote", "get-url", "origin"], { cwd: ctx.worktree })).then(
217 (x) => x.text().trim(),
218 )
219 const parsed = parseGitHubRemote(info)
220 if (!parsed) {
221 prompts.log.error(`Could not find git repository. Please run this command from a git repository.`)
222 throw new UI.CancelledError()
223 }
224 return { owner: parsed.owner, repo: parsed.repo, root: ctx.worktree }
225 }
226
227 async function promptProvider() {
228 const priority: Record<string, number> = {

Callers 1

github.handler.tsFile · 0.85

Calls 3

parseGitHubRemoteFunction · 0.90
textMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected