github-portfolio icon indicating copy to clipboard operation
github-portfolio copied to clipboard

Handle statistics cache misses

Open nilbus opened this issue 10 years ago • 1 comments

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).

nilbus avatar Aug 07 '15 17:08 nilbus

As a workaround, manually reload any profile missing statistics.

nilbus avatar Aug 07 '15 20:08 nilbus