How do I reset issue id counter for a repository?

I’ve imported a repository from bitbucket.

However, issues were not imported automatically along with the repo.

First I thought there is no way to import issues.

So users started with new issues on github (counted from 1).

Then I’ve found the way to export issues from bitbucket and import them to github:

So I deleted all the new issues from github and started import.

But that fails on assert gh_issue_id == issue[‘id’].

The reason is issue id counter on github is no more 1, it is higher.

How to reset that id counter on github back to 1?


I could not find a solution, so what I did was a simple workaround:

I deleted the imported repository and created/imported a new one with the same name and then imported issues into it without problems.