github-portfolio
github-portfolio copied to clipboard
Handle statistics cache misses
See https://developer.github.com/v3/repos/statistics/#a-word-about-caching
This is causing commit counts to come back as 0.
@api.contributors_stats(repo.full_name)
This will return nil for any repository where stats have been invalidated or were never generated.
- [ ] Retry, either in the same request or in a separate one, depending how long it usually takes to generate.
- [ ] If not waiting for it, show a loading indicator for these stats when they are missing (contribution percentage, commit counts).
As a workaround, manually reload any profile missing statistics.