Skip to content

feat: Add an option to wait for primary rate limit reset and retry instead of erroring out #3114

@erezrokah

Description

@erezrokah

Hi 👋 🐰

This is mostly the same issue as #1920

For our use case we'd prefer to wait until the reset time instead of erroring out when the primary rate limit is reached.
The only way I found to do it at the moment is wrap each API call with a check to github.RateLimitError.

We can't use roundtripper as checkRateLimitBeforeDo happens before. I tried wrapping BareDo with my own implementation but couldn't get it to work due to how the services and client are initialized.

If bypassRateLimitCheck was exported I might have been able to use it to bypass the check and get use a roundtripper but that doesn't seem very elegant.

Can you suggestion a solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions