Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for rate limits from GitHub #237

Open
rickardl opened this issue Oct 22, 2020 · 1 comment · May be fixed by #238
Open

Implement support for rate limits from GitHub #237

rickardl opened this issue Oct 22, 2020 · 1 comment · May be fixed by #238

Comments

@rickardl
Copy link
Contributor

GitHub rate limits may apply to some actions when using the API, If we hit a rate limit, it's expected that we back off from making requests and try again later.

  • When you have been limited, use the Retry-After response header to slow down. The value of the Retry-After header will always be an integer, representing the number of seconds you should wait before making requests again. For example, Retry-After: 30 means you should wait 30 seconds before sending more requests.
  • Requests that create content which triggers notifications, such as issues, comments and pull requests, may be further limited and will not include a Retry-After header in the response. Please create this content at a reasonable pace to avoid further limiting.
@bgandon
Copy link

bgandon commented May 11, 2024

The GitHub documentation seems to have evolved a bit, introducing x-ratelimit-remaining and x-ratelimit-reset headers.
See: https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28#handle-rate-limit-errors-appropriately

So the proposed implementation in #238 may have to evolve. But in my own experience, I've never hit rate limits with GitHub API—Is this issue still relevant?

Anyway, now that the Cloud Foundry community is maintaining a fork at cloudfoundry-community/github-pr-resource, it would be nice that any feedback is posted there. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants