The repository that I am looking at has a great number of issues that I would like to read but it's not manageable while scrolling in GitHub interace. Is there an option to export or print a full list of issues for a repository?


There is an Issues API. To get all issues from a repo, you can use cURL:

curl -i https://api.github.com/repos/username/reponame/issues

This returns a JSON encoded list of all issues. And …

curl -i https://api.github.com/repos/username/reponame/issues?status=open

… returns all open issues. Now you just have to convert the JSON to CSV and you are set.

  • Thank you very much for drawing attention to existing GitHub API. – Deer Hunter Jun 15 '13 at 21:42
  • 6
    If the repository is private or you have 2-factor auth enabled, you can still get to this easily by going into Github and creating an application token, and using it like this: curl -X GET -u yourapplicationtoken:x-oauth-basic https://api.github.com/repos/username/reponame/issues?state=all – Unixmonkey Jan 8 '15 at 16:16
  • The application token for curl -X GET -u yourapplicationtoken:x-oauth-basic https://api.github.com/repos/username/reponame/issues?state=all must have the repo scope selected. Otherwise the permission is not granted and you get an 404 error. – k_o_ Apr 4 '19 at 23:46

You can issue hub command for that.

  1. Clone the repo.
  2. Install hub (e.g. on macOS run: brew install hub).
  3. Run: hub issue in your repo directory to list the open issues (it's in Markdown format).

See: hub --help for more info:

These GitHub commands are provided by hub:

   pull-request   Open a pull request on GitHub
   fork           Make a fork of a remote repository on GitHub and add as remote
   create         Create this repository on GitHub and add GitHub as origin
   browse         Open a GitHub page in the default browser
   compare        Open a compare page on GitHub
   release        List or create releases (beta)
   issue          List or create issues (beta)

usage: git issue

List summary of the open issues for the project that the "origin" remote points to.

Note: Above reads git issue, because it expects that you've alias hub to git (GH-966), e.g.

alias git=hub

Other alternative is to use some tools such as: IssuesDownload (Java app), export_repo_issues_to_csv.py, etc.

  • This doesn't work. issue (or issues) is not a hub subcommand. – whitequark Jan 2 '17 at 13:01
  • @whitequark I've got hub 2.2.3 and it has hub issue command. See: help.go. – kenorb Jan 2 '17 at 13:22
  • 1
    Oh! I haven't realized hub was rewritten in go and was using the Ruby gem. – whitequark Jan 2 '17 at 15:23

I've cooked up this helper: https://runkit.io/fiatjaf/586a5b3110e9fd0014ff8aa7/branches/master/formspree/formspree?status=open which uses GitHub API.

Replace formspree/formspree with your own user and repository name. It is a RunKit endpoint. The source code is at https://runkit.com/fiatjaf/586a5b3110e9fd0014ff8aa7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.