(owner, repo, branch, dest string)
| 42 | type defaultFetcher struct{} |
| 43 | |
| 44 | func (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. |
| 54 | func (svc *Service) RefreshFromFiles(ctx context.Context, cfgDir string) (RefreshSummary, error) { |
nothing calls this directly
no test coverage detected