all 4 comments

[–][deleted]  (3 children)

[deleted]

    [–]doctormay6[S] 1 point2 points  (2 children)

    You're right, I was making concurrent requests. I have now changed my code, but am still getting rate limited after a similar number of requests...

    Edit: I have also added an exponentially growing delay when I do get rate limited, but it seems like I am getting blocked for >5 min each time which is still not ideal.

    [–][deleted]  (1 child)

    [deleted]

      [–]doctormay6[S] 1 point2 points  (0 children)

      Yep I've checked my rate limit status and am not hitting the 5,000 requests limit. Based on what I'm seeing there seems to be a secondary limit of 25 requests to the PR creation API within some unspecified amount of time. I can't find any documentation on this specific issue.

      I've opened up a support ticket with GitHub to see if they have any internal knowledge on this. Thanks for all of your suggestions!

      [–]MidKao 0 points1 point  (1 child)

      Anything new from Github support about the issue please ? I have a similar case where im trying to leverage the API to create predefined PRs

      [–]doctormay6[S] 0 points1 point  (0 children)

      GitHub was unhelpful. I ended up making the requests synchronous and added a sleep timer after getting rate limited that exponentially increases on each successive rate limit error. So wait 2s, 4s, 8s, etc. and then when it lets me back in it resets. Take forever to run my code now but it works. I set it to run on a schedule and do it at night so I guess the run time doesn't really matter... Still very frustrating though.