Skip to content

fiedl/github-project-to-csv

Repository files navigation

github-project-to-csv

Simple cli to export github v2 projects to csv

Screenshot

Usage

./github-project-to-csv.rb --project https://github.com/users/fiedl/projects/2 --output project.csv

If you do encounter errors here, please check the troubleshooting section to make sure you have the correct ruby version and gems installed, or run the script via docker.

Installation

  1. Install the github cli: brew install gh
  2. Clone this repo: git clone https://github.com/fiedl/github-project-to-csv.git

Using github personal access tokens

Instead of using the gh command-line client, this tool also supports github personal access tokens. However, github does only support classic personal access tokens for now; fine-grained tokens do not work, yet.

Create a classic token xxx at https://github.com/settings/tokens. Then:

./github-project-to-csv.rb --project https://github.com/users/fiedl/projects/2 --output project.csv --token xxx

Running with docker

If you don't have a local ruby environment, it might be easiest to run this script via docker.

Install docker including the compose plugin: https://docs.docker.com/compose/install/

Then run this from the repository directory:

docker compose run app bundle exec ruby github-project-to-csv.rb --project https://github.com/users/fiedl/projects/2 --output project.csv --token xxx

When not using an access token, this might ask you to manually open a web browser and copy an authentication code in order to authenticate with github.

Troubleshooting

This script requires ruby version 3.2 or higher

Your local ruby version is too old. Please update according to the ruby documentation or run the script via docker.

require: cannot load such file

Some gems are missing locally. Run:

gem install pry httparty

Or run the script via docker.

Further Resources

Author and License

(c) 2023, Sebastian Fiedlschuster

MIT License

About

Simple cli to export github v2 projects to csv

Topics

Resources

License

Stars

Watchers

Forks