GitHub Issue Automation Workflows
This directory contains automated workflows for managing GitHub issues using AWS Bedrock AI.
Overview
The automation system provides:
- Automatic Label Assignment - AI-powered classification of issues
- Duplicate Detection - Semantic similarity analysis to find duplicate issues
- Duplicate Closure - Automatic closure of confirmed duplicates after 3 days
- Stale Issue Management - Closure of inactive issues after 7 days
Workflows
1. Issue Triage (issue-triage.yml)
Trigger: When a new issue is opened
What it does:
- Analyzes the issue title and body using AWS Bedrock Claude Sonnet 4.5
- Assigns relevant labels from the predefined taxonomy
- Detects potential duplicate issues
- Posts a comment if duplicates are found
- Adds the "duplicate" label if applicable
Required Secrets:
AWS_ACCESS_KEY_ID- AWS access key with Bedrock permissionsAWS_SECRET_ACCESS_KEY- AWS secret access keyAWS_REGION(optional) - AWS region, defaults to us-east-1GITHUB_TOKEN- Automatically provided by GitHub Actions
2. Close Duplicates (close-duplicates.yml)
Trigger: Daily at midnight UTC (or manual)
What it does:
- Finds all open issues with the "duplicate" label
- Checks how long the label has been applied
- Closes issues where the label has been present for 3+ days
- Posts a closing comment with reference to the original issue
Manual Trigger:
gh workflow run close-duplicates.yml
3. Close Stale Issues (close-stale.yml)
Trigger: Daily at midnight UTC (or manual)
What it does:
- Finds all open issues with the "pending-response" label
- Checks the last activity date (comments or label changes)
- Closes issues with no activity for 7+ days
- Posts a closing comment explaining the inactivity
Manual Trigger:
gh workflow run close-stale.yml
Setup Instructions
1. AWS Bedrock Access
Ensure you have access to AWS Bedrock with the Claude Sonnet 4.5 model:
- Enable Bedrock in your AWS account
- Request access to the Claude Sonnet 4 model
- Create an IAM user with the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel"
],
"Resource": "arn:aws:bedrock:*::foundation-model/anthropic.claude-sonnet-4-*"
}
]
}
Note: The system uses inference profile ID us.anthropic.claude-sonnet-4-20250514-v1:0 for cross-region routing and higher throughput.
2. GitHub Secrets
Add the following secrets to your repository:
- Go to Settings → Secrets and variables → Actions
- Add the following secrets:
AWS_ACCESS_KEY_ID- Your AWS access key IDAWS_SECRET_ACCESS_KEY- Your AWS secret access key- (Optional)
AWS_REGION- AWS region, defaults to us-east-1
3. Labels
Create the following labels in your repository:
Feature/Component Labels:
- auth, autocomplete, chat, cli, extensions, hooks, ide, mcp, models, powers, specs, ssh, steering, sub-agents, terminal, ui, usability, trusted-commands, pricing, documentation, dependencies, compaction
OS-Specific Labels:
- os: linux, os: mac, os: windows
Theme Labels:
- theme:account, theme:agent-latency, theme:agent-quality, theme:context-limit-issue, theme:ide-performance, theme:slow-unresponsive, theme:ssh-wsl, theme:unexpected-error
Workflow Labels:
- pending-maintainer-response, pending-response, pending-triage, duplicate, question
Special Labels:
- Autonomous agent, Inline chat, on boarding
You can create labels manually or use the GitHub CLI:
gh label create "pending-triage" --color "fbca04" --description "Awaiting maintainer review"
gh label create "duplicate" --color "cfd3d7" --description "This issue is a duplicate"
gh label create "pending-response" --color "d4c5f9" --description "Awaiting response from issue author"
# ... add more labels as needed
4. Install Dependencies
The workflows automatically install dependencies, but for local development:
cd scripts
npm install
npm run build
Troubleshooting
Workflow Fails with AWS Authentication Error
Problem: UnrecognizedClientException or authentication errors
Solution:
- Verify AWS credentials are correctly set in GitHub Secrets
- Ensure the IAM user has Bedrock permissions
- Check that the AWS region is correct
No Labels Are Applied
Problem: Issues are created but no labels are added
Solution:
- Check the workflow run logs for errors
- Verify the labels exist in the repository
- Ensure the Bedrock API is responding correctly
Duplicate Detection Not Working
Problem: Duplicates are not being detected
Solution:
- Check that there are existing open issues to compare against
- Verify AWS Bedrock access is working
- Review the similarity threshold (currently 0.80)
Rate Limiting Issues
Problem: Workflows fail due to GitHub API rate limits
Solution:
- The workflows include rate limit handling
- For high-volume repositories, consider adjusting batch sizes
- Check the rate limit status:
gh api rate_limit
Monitoring
Workflow Run Summaries
Each workflow generates a summary visible in the Actions tab:
- Total issues processed
- Success/failure counts
- Detailed error information
Logs
View detailed logs for each workflow run:
- Go to Actions tab
- Select the workflow
- Click on a specific run
- Expand the steps to see detailed logs
Customization
Adjusting Thresholds
Edit the TypeScript files in scripts/:
Duplicate closure threshold (default: 3 days):
// In close_duplicates.ts
const DAYS_THRESHOLD = 3;
Stale issue threshold (default: 7 days):
// In close_stale.ts
const DAYS_THRESHOLD = 7;
Duplicate similarity threshold (default: 0.80):
// In detect_duplicates.ts
const SIMILARITY_THRESHOLD = 0.8;
Modifying Schedules
Edit the cron expressions in the workflow files:
on:
schedule:
- cron: "0 0 * * *" # Daily at midnight UTC
Support
For issues or questions:
- Check the workflow run logs
- Review the troubleshooting section
- Open an issue in the repository