Open Keyrxng opened 3 days ago
@0x4007 I think this should be given a higher priority and priced for at least a day.
Pros:
Limits have tiers so for V1 we can cover requests-per-minute etc but per-hour would involve calculating how often the plugin will likely run which would pretty difficult to implement.
Make too many requests per minute. No more than 90 seconds of CPU time per 60 seconds of real time is allowed. No more than 60 seconds of this CPU time may be for the GraphQL API. You can roughly estimate the CPU time by measuring the total response time for your API requests. Make too many requests that consume excessive compute resources in a short period of time. Create too much content on GitHub in a short amount of time. In general, no more than 80 content-generating requests per minute and no more than 500 content-generating requests per hour are allowed. Some endpoints have lower content creation limits. Content creation limits include actions taken on the GitHub web interface as well as via the REST API and GraphQL API.
Investigating this issue I built a minimal
Octokit
Proxy
to capture access and call counts.We should built something like this with a toggle maybe into the template especially if we are going to restrict plugin devs to a % of our the hourly call count quota.
We should consider adding support for detecting a secondary rate limit being hit as this is usually the one we hit.
context.octokit
is the soleoctokit
object throughout plugins so it makes it very easily to setup decent analytics through aProxy
.