Seeking a way to clone the issues for github projects

It is not possible to clone issues of GitHub repositories. An alternative for you to get the issues' data would be to use the GitHub APIs.

Check out the documentation here to get issues for a repository.

GET /repos/:owner/:repo/issues

You can get the issues' data using the API, store it in file system and then run your necessary scripts on them.


Thanks to @madhu-bhat's suggestion I read the documents on GitHub's v3 API and discovered examples such as

curl -i "https://api.github.com/repos/vmg/redcarpet/issues?state=closed"

which I then revised to get the open issues for one of our projects:

curl -i "https://api.github.com/repos/kiwix/kiwix-android/issues?state=open"

This approach does what I need and allows me to filter by the state, etc. +1 for StackOverflow.


Disclamers

  • I am involved in creating the github repository listed below.
  • This answer does not provide an exact clone of an issue, but it copies the issues.

Constraints

Kamino requires the Chrome browser and I was not willing to work with an extension. Additionally, I wanted to clone issues from a private repo A to a public repo B, which I was not able to do with the copy issue button.

Solution

So a bit of Python code was written that copies all open issues from repo A to repo B. It is located here: https://github.com/a-t-0/batch-copy-issues and you can use it as:

git clone [email protected]:a-t-0/batch-copy-issues.git
cd batch-copy-issues
conda env create --file environment.yml
conda activate batch_copy_issues
python -m code.project1.src

Then it asks you for the GitHub username and repository from which you want copy the issues, and to which GitHub user and repository you want to copy them to. Next it gets a browser controller, ensures Firefox is installed and starts copying the labels, titles and comments of open issues from repo A to repo B. You can watch it copying the stuff.

Note clone vs copy

Please not this is not an exact "Clone" of an issue, since it does not properly conserve "who said what", since all comments will be written by the person copying the issues. The software would be able to include a small footnote saying originally said by X at time Y., however that is currently not implemented.

Tags:

Git

Github