Skip to content

Commit

Permalink
Update .changeset/rotten-carrots-pump.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed May 6, 2023
1 parent eb53ddf commit de4dff0
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .changeset/rotten-carrots-pump.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@
"@changesets/action": patch
---

add rate limit plugin for octokit
This patch implements the [`@octokit/plugin-throttling`](https://github.com/octokit/plugin-throttling.js) plugin and [wires
it up with the internal GitHub Octokit instance](https://github.com/actions/toolkit/tree/457303960f03375db6f033e214b9f90d79c3fe5c/packages/github#extending-the-octokit-instance).

The changesets GitHub Action triggers 403 (secondary rate limits)[1]
against the GitHub API, which causes the CI jobs to fail, and the only
known workaround is to simply re-run the job.
This plugin is recommended by [the Octokit docs](://octokit.github.io/rest.js/v19#throttling) as it implements all the GitHub [best practices for integrators](https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28).

This patch implements the `@octokit/plugin-throttling`[2] plugin and wires
it up with the GitHub Octokit instance[3].

This plugin is recommended by the Octokit docs[4] as it implements all
the GitHub best practices for integrators[5].

[1]: https://github.com/changesets/action/issues/192
[2]: https://github.com/octokit/plugin-throttling.js
[3]: https://github.com/actions/toolkit/blob/main/packages/github/src/github.ts#LL18C40-L18C40
[4]: https://octokit.github.io/rest.js/v19#throttling
[5]: https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28
This should help with `changesets/action` gitting spurious secondary rate limits and failing CI jobs, for which the only known workaround is to simply re-run the job.

0 comments on commit de4dff0

Please sign in to comment.