MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / parseRepoArg

Function parseRepoArg

internal/cli/management.go:2061–2073  ·  view source on GitHub ↗

parseRepoArg splits "owner/repo" or "owner/repo@branch" into components.

(arg string)

Source from the content-addressed store, hash-verified

2059
2060// parseRepoArg splits "owner/repo" or "owner/repo@branch" into components.
2061func parseRepoArg(arg string) (owner, repo, branch string) {
2062 branch = "main"
2063 // Handle @branch suffix.
2064 if idx := strings.LastIndex(arg, "@"); idx > 0 {
2065 branch = arg[idx+1:]
2066 arg = arg[:idx]
2067 }
2068 parts := strings.SplitN(arg, "/", 2)
2069 if len(parts) != 2 {
2070 return "", "", ""
2071 }
2072 return parts[0], parts[1], branch
2073}
2074
2075// isAlreadyInstalled checks whether the named entity is already installed for the given app.
2076func isAlreadyInstalled(name string, kind entities.Kind, app string) bool {

Callers 1

installFromGitHubFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected