Harden health checks and refresh GitHub health cache

This commit is contained in:
Julien Bisconti
2026-02-28 00:46:59 +01:00
parent 67cc5caaa5
commit ca2246667c
4 changed files with 2186 additions and 7 deletions

View File

@@ -200,6 +200,12 @@ func healthCmd() *cobra.Command {
for _, e := range errs {
fmt.Printf(" error: %v\n", e)
}
if len(infos) == 0 {
if len(errs) > 0 {
return fmt.Errorf("failed to fetch GitHub metadata for all repositories (%d errors); check network/DNS and GITHUB_TOKEN", len(errs))
}
return fmt.Errorf("no GitHub repositories found in README")
}
scored := scorer.ScoreAll(infos)
cacheEntries := scorer.ToCacheEntries(scored)