-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Is your feature request related to a problem? Please describe.
When analyze_org or analyze_repo is run against an empty repository, the clone will fail and an error will be printed.
./poutine analyze_org my-org --token="..."
Analyzing repositories 23% |█████████ | (128/542) [2m33s:6m45s]
11:00AM | ERROR | failed to clone repo error="failed to clone repo: command `/usr/local/bin/git fetch --quiet --no-tags --depth 1 --filter=blob:none origin HEAD` returned an error: exit status 128 stderr: fatal: couldn't find remote ref HEAD" repo=my-org/empty_repo
Describe the solution you'd like
Since empty repos should be a "known" issue, it should print a message to the effect of "skipping empty repo", rather than a vague error.
Possible solutions:
- Update the
Repositoryinterface to includeGetSize(). Then, when iterating repositories any ones with a size of 0 (i.e., empty) can be skipped. This assumes that every current and future provider, uh, provides the repository size in the API. - Update the client logic for each provider to filter empty repositories before sending them to the channel, if possible.
Metadata
Metadata
Assignees
Labels
No labels