Today I'm going to show you how you can easily export Issue, Releases, Milestone, Commit History and more from GitHub, using the GitHub Artifact Exporter.
GitHub Artifact Exporter provides a CLI and a simple GUI for exporting GitHub Issues and related comments based on a date range, and it supports GitHub’s full search syntax, allowing you to filter results based on your search parameters.
The CLI also supports exporting:
- Pull requests, including comments
And you can export all of that in different formats: JSON, JSON lines, CSV, and Jira-formatted CSV. And of course if you export in CSV, it means that you can open it in Excel. Cool right?
As usual, if you are a visual learner, or simply prefer to watch and listen instead of reading, here you have the video with the whole explanation and demo, which to be fair is much more complete than this post.
If you rather prefer reading, well... let's just continue :)
There are few prerequisites to run the exporter.
All you need to do is install lerna via npm and then use it to build and run the project as directed from the instructions in the repository.
npm install -g lerna
Yes, you've heard it right... The GitHub Artifact Exporter comes with the sources and you have to build it yourself. We will do it in a moment, and you can find the link to the repo in the video description.
Second prerequisite is to generate a Personal Access Token with the "read packages" scope so you can pull from GitHub Package Registry.
Alright, let's quickly see how to install the tool... or better, build it since it comes with the source code :)
First think we need is the code. Head to the official repo and, download the package in the release.
To install the GUI, we need to execute the lerna commands to build the whole thing:
lerna exec npm install lerna link lerna bootstrap
The step above builds also the CLI part, and in fact you can go into the
/packages/cli/bin folder and there you will find the cmd executable for it.
But you can also install the CLI standalone using:
npm install @github/github-artifact-exporter-cli
Alright, now that we have it installed let's see how to use it.
Like, share and follow me 🚀 for more content: