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

fix: prevent hitting github secondary rate limits #286

Merged
merged 7 commits into from
May 6, 2023
Merged

fix: prevent hitting github secondary rate limits #286

merged 7 commits into from
May 6, 2023

Commits on May 4, 2023

  1. fix: prevent hitting github secondary rate limits

    Adds the octokit plugin for throttling / rate-limiting to fix the
    problem where action runs get blocked with a 403 error[1].
    
    The `github.getOctokit`[2] function accepts a list of plugins, so this
    passes in the `throttling` plugin[3] to be hooked into the octokit
    instance.
    
    It also needs some configuration to setup the `throttle` mechanisms,
    passed in to the `getOctokit` function.
    
    [1]: #192
    [2]: https://github.com/actions/toolkit/blob/main/packages/github/src/github.ts#LL18C40-L18C40
    [3]: https://github.com/octokit/plugin-throttling.js
    varl committed May 4, 2023
    Configuration menu
    Copy the full SHA
    d7dd513 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. refactor: change rate limit callback signatures

    Based on additional docs, the callbacks seem to have changes to their
    signatures[1]. This change aligns this implementation with the docs[2].
    
    [1]: https://octokit.github.io/rest.js/v19#throttling
    [2]: https://github.com/octokit/plugin-throttling.js/blob/v5.1.1/src/index.ts#L90-L91
    varl committed May 5, 2023
    Configuration menu
    Copy the full SHA
    e2d743e View commit details
    Browse the repository at this point in the history
  2. chore: add changeset

    varl committed May 5, 2023
    Configuration menu
    Copy the full SHA
    0076fb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    03089a7 View commit details
    Browse the repository at this point in the history
  4. Upgrade TS

    Andarist committed May 5, 2023
    Configuration menu
    Copy the full SHA
    2eda2d9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb53ddf View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    de4dff0 View commit details
    Browse the repository at this point in the history