Prerequisite: Install Node.js, then run this to install:
npm install -g github-csv-toolsAfter install, githubCsvTools --help for info on how to use, or see below.
Instructions for exporting or importing:
Currently imports title, body, labels, status (closed or open) and milestones. See the test folder for example input formats.
githubCsvTools myFile.csvgithubCsvToolsComplete Workflow Example:
# 1. Export issues with comments from a repository
githubCsvTools -o Cookie-AutoDelete -r Cookie-AutoDelete -c -f issues-with-comments.csv
# 2. Clean and organize the exported data
python3 clean_csv.py
# 3. Analyze the cleaned data
python3 analyze_csv.py
# 4. Generate an HTML report
python3 generate_report.pyThis workflow transforms raw GitHub data into clean, analyzable CSV files and professional reports.
| Option | Default | Notes |
|---|---|---|
| -f, --exportFileName | YYYY-MM-DD-hh-mm-ss-issues.csv | The name of the CSV you'd like to export to. |
| -a, --exportAttributes | number, title, labels, state, assignees, milestone, comments, created_at, updated_at, closed_at, body | Comma-separated list of attributes (columns) in the export**. |
| -c, --exportComments | n/a | Include comments in the export. If using in combination with --exportAttributes, id must be included. |
| -e, --exportAll | n/a | Export all possible values from the GitHub API. If not included, a subset of attributes (see --exportAttributes above) that are known to be compatible with GitHub import will be included in the export. |
** List of all possible options for exportAttributes includes every option in the GitHub API Export. Values in child objects can be referenced using a "dot" - for example, a user's avatar_url can be accessed via user.avatar_url.
For all actions, the tool will ask you to input a GitHub token. To obtain this token:
- Go to https://github.com/settings/tokens
- Click "Generate New Token"
- Check on
repo - Copy/paste the token provided when the tool asks for it.
| Option | Notes |
|---|---|
| -V, --version | Output the version number |
| -g, --github_enterprise | Your GitHub Enterprise URL. https://your-internal-githubenterprise.com/api/v3 (Reminder: do not forget the /api/v3 at the end) |
| -t, --token | The GitHub token. https://github.com/settings/tokens |
| -o, --organization | The User or Organization slug that the repo lives under. Example: For /myOrg/my-repo, this value would be myOrg. |
| -r, --repository | The repository name (slug). Example: For /myOrg/my-repo, this value would be my-repo. |
| --csvDelimiter | The CSV delimiter character (defaults to ',') |
| -v, --verbose | Include additional logging information. |
| -h, --help | See all the options and help. |
After exporting large CSV files, you may find the data needs cleaning and organization. We've included several Python scripts to help:
python3 clean_csv.pyThis script:
- Removes HTML tags from issue bodies and comments
- Truncates long text fields for better readability
- Organizes columns with clear naming conventions
- Adds row type indicators (issue vs comment)
- Decodes HTML entities
- Removes extra whitespace
python3 analyze_csv.pyProvides insights including:
- Total issues and comments count
- Issue status breakdown (open/closed)
- Top labels and their frequencies
- Most active users and commenters
- Date range of issues
- Recent activity summary
python3 generate_report.pyCreates a beautiful, interactive HTML report (cookie-autodelete-report.html) with:
- Visual statistics and charts
- Organized tables of top contributors
- Recent issues overview
- Professional styling for easy sharing
The analysis tools require Python 3 and standard libraries (no additional packages needed).
- Clone the repo.
- Browse to repo, then run
npm install -g
See CHANGELOG.md
This software can be used without download/install by going to repoio.com.