This is a Node.js script that allows you to add issues to a GitHub repository from a CSV file. It uses the csv-parser library to read the CSV file and the GitHub CLI to interact with the GitHub API.
demo.mp4
Before running the script, you need to have:
- A GitHub account
- GitHub CLI installed and authenticated
- Node.js installed on your machine
- Clone this repository to your local machine
- Navigate to the cloned directory and run
pnpm install
to install the dependencies - Authenticate with GitHub CLI by running
gh auth login
and follow the prompts
To use the script:
- Run
pnpm run add-issues
from the command line - Enter the repository in the format
owner/repo
(e.g.,usagizmo/github-issues-from-csv
) - Choose the CSV file you want to use (either
sample-1.csv
orsample-2.csv
) - The script will create issues in the repository based on the data in the CSV file
- No .env file required: Uses GitHub CLI authentication
- Automatic validation: Checks GitHub CLI installation and authentication status
- Repository verification: Confirms repository exists and is accessible
- CSV validation: Validates CSV format and required fields
- Error handling: Comprehensive error handling with clear messages
- Progress tracking: Shows progress during issue creation
This project is licensed under the MIT License.