I need you to create an intelligent Issue Management automation workflow for this Node.js project. The project currently has no GitHub Actions workflows, so you'll be building an issue-focused automation system from scratch that responds to issue events. Here's what needs to be implemented:
Issue Management Workflow
Create .github/workflows/issue-automation.yml that triggers on issues events (opened, labeled) with these jobs:
1. issue-triage job:
- Auto-assigns category labels based on keywords in issue title (case-insensitive):
- Title contains "bug" β adds
buglabel - Title contains "epic" β adds
epiclabel - Title contains "maintenance" β adds
maintenancelabel
- Title contains "bug" β adds
- Auto-assigns priority labels based on keywords in issue title OR body (case-insensitive, highest priority wins if multiple keywords found):
- "critical", "urgent", "production", "outage" β
priority-critical - "important", "high", "blocking" β
priority-high - "medium", "normal" β
priority-medium(default if no priority keywords found) - "low", "nice-to-have", "minor" β
priority-low
- "critical", "urgent", "production", "outage" β
- All issues get
needs-triagelabel initially
2. task-breakdown job:
- For issues with a title containing "Epic", create exactly 4 sub-issues with the pattern: "[SUBTASK] [Original Title] - Task N: [Task Name]"
- Task names: 1. Requirements Analysis, 2. Design and Architecture, 3. Implementation, 4. Testing and Documentation
- Links sub-issues to parent using "Related to #[parent-number]" in sub-issue body
- Updates parent issue body with "## Epic Tasks" checklist linking to sub-issue numbers
- All sub-issues get
enhancementandneeds-reviewlabels
3. auto-response job:
- Checks if the issue author is creating their first issue in this repository (not first on GitHub globally, but first in this specific repo)
- If first issue in repo: adds
first-time-contributorlabel and posts welcome message - Posts different responses based on issue type:
bugissues: comment must contain "Bug Report Guidelines"epicissues: comment must contain "Feature Request Process"maintenanceissues: comment must contain "Maintenance Guidelines"
- Sets milestone "v1.0.0" for
priority-highandpriority-criticalissues - Changes status from
needs-triagetoneeds-reviewafter response
Label Management Requirements
The system must create and manage these specific labels:
Category Labels:
bug- Something isn't workingenhancement- New feature or requestepic- Large feature requiring multiple sub-tasksmaintenance- Maintenance and housekeeping tasks
Priority Labels:
priority-critical- Critical priority issuepriority-high- High priority issuepriority-medium- Medium priority issuepriority-low- Low priority issue
Status Labels:
needs-triage- Needs to be reviewed by maintainersneeds-review- Awaiting review from maintainersfirst-time-contributor- Issue created by first-time contributor
Implementation Requirements:
Step 1: Create Feature Branch
Create a new branch called issue-management-workflow from main.
Step 2: Create Supporting Files Create these additional files on the new branch:
.github/ISSUE_TEMPLATE/bug_report.md- Bug report template.github/ISSUE_TEMPLATE/feature_request.md- Feature request template.github/ISSUE_TEMPLATE/maintenance_report.md- Maintenance report template
Step 3: Implement the Workflow
Create .github/workflows/issue-automation.yml with proper YAML syntax.
Include:
- Appropriate triggers for issues events
- Job dependencies where needed
- Error handling and graceful fallbacks
- Avoid identifier conflicts in github-script actions (don't redeclare 'github')
Step 4: Create and Merge Pull Request Create a comprehensive pull request and merge it to main:
- Title: "Implement Issue Management Automation Workflow"
- Detailed description of the workflow and its purpose
- Include all workflow files and templates created
- Merge the pull request to main branch
Step 5: Test the Workflow Create test issues to demonstrate the issue automation workflow:
Bug Issue: "Bug: Login form validation not working"
- Expected:
bug,priority-high,needs-triageβneeds-review, milestone "v1.0.0" - Auto-response comment must contain "Bug Report Guidelines"
- Expected:
Epic Issue: "Epic: Redesign user dashboard interface"
- Expected:
epic,priority-high,needs-triageβneeds-review, milestone "v1.0.0" - Must create 4 sub-issues with
enhancementandneeds-reviewlabels - Parent updated with "## Epic Tasks" checklist, sub-issues linked with "Related to #[parent-number]"
- Auto-response comment must contain "Feature Request Process"
- Expected:
Maintenance Issue: "Weekly maintenance cleanup and refactor"
- Expected:
maintenance,priority-medium,needs-triageβneeds-review, no milestone - Auto-response comment must contain "Maintenance Guidelines"
- Expected: