This project automates the creation of GitHub issues from a CSV file using the GitHub CLI (gh). It is designed to streamline project planning by allowing you to define issues in a structured format and create them in bulk.
- GitHub CLI: Ensure the GitHub CLI (
gh) is installed on your system. You can install it from GitHub CLI Installation Guide. - Authentication: Log in to the GitHub CLI by running:
Make sure you have the necessary permissions to create issues and labels in the target repository.
gh auth login
- CSV File: Prepare a CSV file named
issues.csvin the following format:title,body,assignees,labels,milestone "Issue Title","Issue description","assignee1,assignee2","label1,label2","Milestone Name"
- Clone this repository or copy the script to your local machine.
- Place the
issues.csvfile in the same directory as the script. - Open the script (
script.sh) and update theREPOvariable to point to your target GitHub repository:REPO="YourUsername/YourRepository"
- Make the script executable:
chmod +x script.sh
- Run the script:
./script.sh
- Follow the prompts to create issues.
- Label Creation: Automatically creates missing labels defined in the CSV file.
- Bulk Issue Creation: Reads issues from the CSV file and creates them in the specified repository.
The issues.csv file should have the following columns:
title: The title of the issue.body: A detailed description of the issue.assignees: Comma-separated GitHub usernames to assign the issue to.labels: Comma-separated labels to apply to the issue.
Example:
title,body,assignees,labels,milestone
"Implement Feature X","Description of feature X","user1,user2","feature,backend","Milestone 1"
"Fix Bug Y","Description of bug Y","user3","bug,frontend","Milestone 2"
An example issues.csv file is provided in this repository as issues.example.csv. You can use it as a template by copying it to your working directory and renaming it to issues.csv:
cp issues.example.csv issues.csvModify the contents of issues.csv to suit your project needs.
- Authentication Errors: Ensure you are logged in to the GitHub CLI and have the correct permissions.
- Label Not Found: The script will automatically create missing labels. If a label already exists, it will skip creation.
- CSV Parsing Issues: Ensure the CSV file is properly formatted with no extra commas or missing fields.
- The script does not currently support milestones. If milestones are included in the CSV, they will be ignored.
- Ensure the repository is accessible and you have the necessary permissions to create issues and labels.
This project is open-source and available under the MIT License.