A powerful and flexible Python tool to automatically create GitHub issues from text files using configurable JSON templates. Perfect for bulk issue creation, project planning, standardized workflows, and team collaboration.
- π Template-Based Creation: Use JSON configuration files to define custom issue templates
- π Bulk Issue Creation: Create multiple issues from simple text files
- π·οΈ Labels & Assignees: Automatically assign labels, assignees, and milestones
- π Duplicate Prevention: Smart checking to avoid creating duplicate issues
- π§ͺ Dry Run Mode: Test your configuration safely before creating actual issues
- βοΈ Highly Configurable: Easy-to-modify JSON templates for any workflow
- π― Template Variables: Use
{item}placeholder for dynamic content
- Python 3.7+
- GitHub Personal Access Token
- Required packages:
requests,python-dotenv
git clone https://github.com/CloudSecOpsAI/github-utilities.git
cd github-utilities/issue-creator
pip install -r requirements.txt- Get a GitHub Personal Access Token with
reposcope - Copy the environment template:
cp env.example .env- Edit
.envand add your token:
GITHUB_TOKEN=your_token_here# Test with dry run (safe, no issues created)
python github-issue-creator.py --config config-examples/basic-config.json --file examples/sample-items.txt
# Actually create issues
python github-issue-creator.py --config config-examples/basic-config.json --file examples/sample-items.txt --no-dry-run{
"repository": {
"owner": "myorg",
"name": "myrepo"
},
"issue_template": {
"title_format": "Add {item} support",
"body_template": "**Objective**\nImplement {item} functionality..."
},
"labels": ["enhancement", "feature"],
"assignees": ["developer"],
"input_file": "features-list.txt"
}Perfect for product planning and user story creation.
Ideal for security standards and audit requirements.
Create a simple text file with one item per line:
Example (examples/sample-items.txt):
User Authentication
Dashboard Analytics
Email Notifications
Mobile App
API Documentation
Each line becomes an {item} in your template!
| Option | Description | Example |
|---|---|---|
--config |
Path to JSON configuration file | --config my-config.json |
--file |
Path to input text file (overrides config) | --file items.txt |
--dry-run |
Test mode - no issues created (default) | --dry-run |
--no-dry-run |
Actually create issues | --no-dry-run |
# Create feature request issues
python github-issue-creator.py \
--config config-examples/feature-requests.json \
--file product-features.txt \
--no-dry-run# Create compliance tracking issues
python github-issue-creator.py \
--config config-examples/compliance-tracking.json \
--file security-standards.txt \
--no-dry-run# Test configuration first
python github-issue-creator.py --config sprint-config.json --dry-run
# Create sprint issues
python github-issue-creator.py --config sprint-config.json --no-dry-run- Sprint planning and task creation
- Feature roadmap tracking
- Bug fix initiatives
- Security audit requirements
- Compliance standard tracking
- Risk assessment tasks
- API endpoint implementation
- Library integrations
- Testing requirements
- Onboarding checklists
- Documentation tasks
- Code review processes
github-issue-creator/
βββ github-issue-creator.py # Main script
βββ requirements.txt # Dependencies
βββ README.md # This documentation
βββ LICENSE # MIT License
βββ .gitignore # Git ignore patterns
βββ env.example # Environment template
βββ config-examples/ # Configuration templates
β βββ basic-config.json # Basic feature requests
β βββ feature-requests.json # Product planning
β βββ compliance-tracking.json # Security/compliance
βββ examples/ # Usage examples
βββ sample-items.txt # Example input file
βββ create-issues.sh # Demo script
- Automatically checks existing open issues
- Compares issue titles to avoid duplicates
- Skips creation if issue already exists
- Test your templates safely
- See exactly what would be created
- Default behavior prevents accidents
- Validates JSON configuration files
- Checks for required fields
- Verifies file paths and permissions
Dry run is set to: True (default is True; set to False to actually create issues)
Summary of inputs:
Config: config-examples/basic-config.json
Owner: myorg
Repo: myrepo
Input File: examples/sample-items.txt
Labels: enhancement, feature
Assignees: developer
π Would post to: https://api.github.com/repos/myorg/myrepo/issues
Title: Add User Authentication support
Labels: enhancement, feature
Assignees: developer
[DRY RUN] Issue not actually created.
β οΈ Skipped (already exists): Add Dashboard Analytics support
β
Created: Add User Authentication support
β οΈ Skipped (already exists): Add Dashboard Analytics support
β
Created: Add Email Notifications support
cp config-examples/basic-config.json my-config.json{
"repository": {
"owner": "your-org",
"name": "your-repo"
},
"issue_template": {
"title_format": "Implement {item}",
"body_template": "## Objective\nImplement {item} in our system...\n\n## Tasks\n- [ ] Research {item}\n- [ ] Design solution\n- [ ] Implement {item}"
},
"labels": ["enhancement"],
"assignees": ["team-lead"]
}echo -e "Payment Gateway\nUser Dashboard\nEmail System" > my-items.txt# Test first
python github-issue-creator.py --config my-config.json --file my-items.txt
# Create issues
python github-issue-creator.py --config my-config.json --file my-items.txt --no-dry-runAuthentication Error
β Missing GitHub token
Solution: Set GITHUB_TOKEN in .env file
Configuration File Error
β Config file not found: my-config.json
Solution: Check file path and ensure file exists
Invalid JSON
β Invalid JSON in config file
Solution: Validate JSON syntax using online JSON validator
Input File Error
β Invalid input file: items.txt
Solution: Ensure file exists and has .txt extension
- Always Test First: Use dry-run mode before creating actual issues
- Descriptive Titles: Make issue titles clear and searchable
- Consistent Templates: Use standardized templates across projects
- Version Control: Keep configuration files in source control
- Regular Cleanup: Archive or close completed configuration files
- Team Standards: Establish labeling and assignment conventions
{
"issue_template": {
"title_format": "Implement {item} API endpoint",
"body_template": "## API Endpoint: {item}\n\n### Requirements\n- [ ] Design {item} endpoint\n- [ ] Implement business logic\n- [ ] Add validation\n- [ ] Write tests\n- [ ] Update documentation"
}
}{
"issue_template": {
"title_format": "Fix: {item} issue",
"body_template": "## Bug Report: {item}\n\n### Description\nResolve {item} related issues.\n\n### Steps\n- [ ] Investigate {item} problem\n- [ ] Identify root cause\n- [ ] Implement fix\n- [ ] Test solution"
}
}{
"issue_template": {
"title_format": "Document {item}",
"body_template": "## Documentation Task: {item}\n\n### Objective\nCreate comprehensive documentation for {item}.\n\n### Deliverables\n- [ ] User guide for {item}\n- [ ] Technical specifications\n- [ ] Examples and tutorials"
}
}- Automatically create issues from deployment failures
- Generate release tracking issues
- Export configurations for different project types
- Sync with existing project templates
- Onboarding task creation
- Regular maintenance issue generation
- Fork the repository
- Create a feature branch
- Add your improvements
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this tool helpful:
- β Star the repository
- π Report issues
- π‘ Suggest features
- π€ Contribute improvements
Transform your GitHub issue creation workflow! π