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

Method Fetch

internal/metadata/refresh.go:44–51  ·  view source on GitHub ↗
(owner, repo, branch, dest string)

Source from the content-addressed store, hash-verified

42type defaultFetcher struct{}
43
44func (defaultFetcher) Fetch(owner, repo, branch, dest string) (string, error) {
45 // A shorter timeout than the package default so one slow/unreachable repo
46 // doesn't tie up a worker for a full minute during a bulk refresh.
47 client := fetching.New()
48 client.HTTPClient.Timeout = 30 * time.Second
49 client.Timeout = 30 * time.Second
50 return client.DownloadGitHubZip(owner, repo, branch, dest)
51}
52
53// RefreshFromFiles reads *_repos.json files from cfgDir and indexes entries into SQLite.
54func (svc *Service) RefreshFromFiles(ctx context.Context, cfgDir string) (RefreshSummary, error) {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
DownloadGitHubZipMethod · 0.80

Tested by

no test coverage detected