Skip to content

Directly handle rate limiting using client.rate_limit.resets_in. #967

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

Conversation

ioquatix
Copy link
Contributor

@ioquatix ioquatix commented Jun 2, 2021

We discussed some issues here, and at least when I tried, it, I ran into rate limiting issues.

#965 (comment)

This PR tries to respect GitHub's rate limiting.

@olleolleolle
Copy link
Collaborator

Ugh I was so curious about the test results, and it was styling issues that stopped the build. I should flip those around, check style after running tests.

rescue MovedPermanentlyError => e
fail_with_message(e, "The repository has moved, update your configuration")
rescue Octokit::TooManyRequests => e
resets_in = client.rate_limit.resets_in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 I learned! resets_in (a time) is even provided by Octokit, thanks for finding this out!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are most welcome!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This lets us use Octokit in a more precise way.

@olleolleolle olleolleolle merged commit d801469 into github-changelog-generator:master Jun 3, 2021
@ioquatix ioquatix deleted the better-handling-of-rate-limits branch June 3, 2021 10:25
@ioquatix
Copy link
Contributor Author

ioquatix commented Jun 3, 2021

Thanks for handling this!

@aelam
Copy link

aelam commented May 23, 2022

it seems that It does not work well as before.

@ioquatix
Copy link
Contributor Author

@aelam what is the problem?

@aelam
Copy link

aelam commented Sep 1, 2022

@ioquatix Sorry for late, after I waited a long time, it worked

@Mizommz
Copy link

Mizommz commented May 17, 2025

We discussed some issues here, and at least when I tried, it, I ran into rate limiting issues.

#965 (comment)

This PR tries to respect GitHub's rate limiting.

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 this pull request may close these issues.

4 participants