How can I export all my issues from an Enterprise GitHub repository to an Excel file? I have tried searching many Stack Overflow answers but did not succeed. I tried this so
Export Pull Requests can export issues to a CSV file, which can be opened with Excel. It also supports GitLab and Bitbucket.
From its documentation:
Export open PRs and issues in sshaw/git-link and sshaw/itunes_store_transporter:
epr sshaw/git-link sshaw/itunes_store_transporter > pr.csv
Export open pull request not created by sshaw in padrino/padrino-framework:
epr -x pr -c '!sshaw' padrino/padrino-framework > pr.csv
It has several options for filtering what gets exported.
The hub command-line wrapper for github makes this pretty simple.
You can do something like this:
$ hub issue -f "%t,%l%n" > list.csv
which gives you something like this
$ more issue.csv
Issue 1 title, tag1 tag2
Issue 2 title, tag3 tag2
Issue 3 title, tag1
To export from a private repo using curl, you can run the following:
curl -i "https://api.github.com/repos/<repo-owner>/<repo-name>/issues" -u "<user-name>"
Where the user has access to the private repo. You can then convert the resulting json into csv using any suitable converter as suggested in other answers.
Find authentication reference here.
As a one-time task, building on 'hub'-based recommendation from @Chip... on a windows system with GitBash prompt already installed:
Download the latest hub executable (such as Windows 64 bit) https://github.com/github/hub/releases/ and extract it (hub.exe is in the .../bin directory).
Create a github personal access token https://github.com/settings/tokens and copy the token text string to the clipboard.
Create a text file (such as in notepad) to use as the input file to hub.exe... the first line is your github user name and on the 2nd line paste the personal access token, followed by a newline (so that both lines will processed when input to hub). Here I presume the file is infile.txt in the repository's base directory.
Run Git Bash... and remember to cd (change directory) to the repository of interest! Then enter a line like:
<path_to_hub_folder>/bin/hub.exe issue -s all -f "%U|%t|%S|%cI|%uI|%L%n" < infile.txt > outfile.csv
Then open the file with '|' as the column delimiter. (and consider deleting the personal access token on github).
If that is a one-time task, you may play around with GitHub WebAPI. It allows to export the issues in JSON format. Then you can convert it to Excel (e.g. using some online converter).
Just open the following URL in a browser substituting the {owner}
and {repo}
with real values:
https://api.github.com/repos/{owner}/{repo}/issues?page=1&per_page=100
With the official GitHub CLI you can easily export all issues into a CSV format.
brew install gh
Log in:
gh auth login
Change directory to a repository and run this command:
gh issue list --limit 1000 --state all | tr '\t' ',' > issues.csv
In the European .csv files the separator is a semicolon ';'
, not a comma. Modify the separator as you want.