Skip to content

Rate limit when creating review reply comments #775

@mschoettle

Description

@mschoettle

I run a script to migrate pull requests which includes the creation of PR reviews and their comments.

I started receiving a validation error with code abuse which I believe is some kind of exceeding the rate limit

POST /repos/<owner>/<repo>/pulls/201/comments/<comment_id>/replies - 422 with id EB8A:37B3E7:1CAFC40:398B982:67C5DC77 in 264ms
RequestError [HttpError]: Validation Failed: {"resource":"PullRequestReview","code":"abuse","field":"base"} - https://docs.github.com/rest/pulls/comments#create-a-reply-for-a-review-comment
    at fetchWrapper (file:///app/node_modules/@octokit/request/dist-bundle/index.js:122:11)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Job.doExecute (/app/node_modules/bottleneck/light.js:405:18) {
  status: 422,
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/<owner>/<repo>pulls/201/comments/<comment_id>replies',

Would it be possible to catch that and retry later like the rest?

Might be related to #667. It's not totally clear how to avoid it in the first place. Should I add more "waits" in my script?

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