node-gitlab-2-github: Crash with abuse rate limits

After having migrated ~20 milestones & ~10 issues, the program crashed on an issue creation request, with the following error message:

Error: {"message":"You have triggered an abuse detection mechanism and have been temporarily blocked from content creation. Please retry your request again later.","documentation_url":"https://developer.github.com/v3/#abuse-rate-limits"}

Reading this section & this section from the official docs, I guess the problem comes from performing more than 1 request per second.

I’d say this program doesn’t take precautions in term of github rate abuse limits, but I’m really puzzled by the fact that the README mentions a successful 300 issues migration

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

It turns out there is an octokit.request function, so theoretically that could be used to refactor githubHelper.createIssueAndComments().

Apparently there is a different endpoint for issue creation at https://api.github.com/repos/${GITHUB_USERNAME}/${GIHUB_REPONAME}/import/issues, see this gist. Since it does not send notifications, it is not subject to the secondary rate limit.