Contribution counts show >99 when github rate limits exceeded
rkent opened this issue · 1 comments
rkent commented
Github limits unauthenticated API requests to 60 per hour. Each time a repo is displayed, three api requests are being made (in contribution_suggestions.js). It is quite easy to exceed this limit if you are using rosindex to display lots of packages.
When you do exceed the limit, the UI displays ">99" which is confusing.
How to approach this?
- fix the UI to show something like "ERR" instead of ">99" when the limit is exceeded.
- combine the three requests per repo into a single request with multiple labels, and use js to count by type.
- consider only displaying contribution requests when the user wants them, rather than all of the time.
rkent commented
Correction to the above. Of the three requests that are done for each repo, only two are for issues, one is for pull. So combining calls can only reduce rate usage from 3 to 2 API requests per repo render.