anc95 / anc95/ChatGPT-CodeReview

Rate limit

Open
#201 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
4.5k
Forks
461
PR merge metrics
No merged PRs in 30d

Description

On many changed files, PR, the action gets into a loop of rate limit errors.

Warning: [@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead
{ name: 'octokit' }
Warning: Abuse limit hit with "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews", retrying in 5 seconds.

It appears that 5-second retries are not sufficient for GitHub to release the rate limit.

My suggestion is to add a comment as soon as every file scan is finished, this way the delay between POSTs will be long enough not to cause this loop.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the @octokit/plugin-throttling configuration and the POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews request path. Check how onAbuseLimit() and onSecondaryRateLimit are handled, then reproduce the loop with many changed files; done means reviews no longer retry indefinitely after rate limits.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.