How can I export GitHub issues to Excel?

2019-02-03 10:32发布

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 solution too (exporting Git issues to CSV and getting "ImportError: No module named requests" errors. Is there any tool or any easy way to export all the issues to Excel?

4条回答
Melony?
2楼-- · 2019-02-03 11:03

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

查看更多
乱世女痞
3楼-- · 2019-02-03 11:05

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.

查看更多
forever°为你锁心
4楼-- · 2019-02-03 11:11

I tried the methods described in other comments regarding exporting issues in JSON format. It worked ok but the formatting was somehow screwed up. Then I found in Excel help that it is able to access APIs directly and load the data from the JSON response neatly into my Excel sheets.

The Google terms I used to find the help I needed were "excel power query web.content GET json". I found a How To Excel video which helped a lot.

URL that worked in the Excel query (same as from other posts):

https://api.github.com/repos/{owner}/{repo}/issues?page=1&per_page=100

Personally, I also add the parameter &state=open, otherwise I need to request hundreds of pages. At one point I reached GitHub's limit on unauthenticated API calls/hour for my IP address.

查看更多
虎瘦雄心在
5楼-- · 2019-02-03 11:14

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.

查看更多
登录 后发表回答