Skip to content

Hitting abuse rate limit in github action when deleting tags #1980

Answered by gr2m
jamie-wearsafe asked this question in Q&A
Discussion options

You must be logged in to vote

It doesn't look like you are using @octokit/rest, but actions-toolkit. I do not maintain this library. I think they use Octokit internally but I don't know how up-to-date it is. If you like you can use https://github.com/octokit/action.js, in which case you could load the throttle plugin, which will help to reduce the problem of hitting rate/abuse limits.

const { Octokit } = require("@octokit/action");
const { throttling } = require("@octokit/plugin-throttling");

const MyOctokit = Octokit.plugin(throttling).defaults({
    throttle: {
    onRateLimit: (retryAfter, options, octokit) => {
      octokit.log.warn(
        `Request quota exhausted for request ${options.method} ${options.url}`

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jamie-wearsafe
Comment options

@gr2m
Comment options

@jamie-wearsafe
Comment options

@gr2m
Comment options

Answer selected by jamie-wearsafe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants