-
Notifications
You must be signed in to change notification settings - Fork 7.8k
feat(ci): add a backlog clean up bot #12128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Hello dmitriyastapov, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces an automated GitHub Actions workflow to manage stale issues in the repository. The bot runs daily at 4 AM UTC and can also be triggered manually with an optional dry-run mode for testing. It processes open issues based on inactivity (90+ days) and applies different actions depending on issue status, labels, and assignment.
Key changes:
- Automated closure of unassigned or "awaiting-response" issues after 90+ days of inactivity
- Friendly reminder comments to assignees on inactive but assigned issues
- Automatic labeling of question-type issues for migration to GitHub Discussions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
.github/workflows/backlog-bot.yml |
GitHub Actions workflow that schedules daily runs at 4 AM UTC with manual trigger support and dry-run capability |
.github/scripts/backlog-cleanup.js |
Core logic implementing issue triage, closure, reminder, and discussion migration behaviors with pagination support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const thresholdDays = 90; | ||
| const exemptLabels = ['Status: Community help needed', 'Status: Needs investigation', 'Move to Discussion']; | ||
| const closeLabels = ['Status: Awaiting Response']; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold of 90 days and the list of exempt/close labels are hardcoded. Consider making these configurable through environment variables or workflow inputs to allow easier adjustment without modifying the script. This would improve maintainability and flexibility for different repository needs.
| const thresholdDays = 90; | |
| const exemptLabels = ['Status: Community help needed', 'Status: Needs investigation', 'Move to Discussion']; | |
| const closeLabels = ['Status: Awaiting Response']; | |
| // Allow configuration via environment variables, fallback to defaults | |
| const thresholdDays = process.env.BACKLOG_CLEANUP_THRESHOLD_DAYS | |
| ? parseInt(process.env.BACKLOG_CLEANUP_THRESHOLD_DAYS, 10) | |
| : 90; | |
| const exemptLabels = process.env.BACKLOG_CLEANUP_EXEMPT_LABELS | |
| ? process.env.BACKLOG_CLEANUP_EXEMPT_LABELS.split(',').map(l => l.trim()) | |
| : ['Status: Community help needed', 'Status: Needs investigation', 'Move to Discussion']; | |
| const closeLabels = process.env.BACKLOG_CLEANUP_CLOSE_LABELS | |
| ? process.env.BACKLOG_CLEANUP_CLOSE_LABELS.split(',').map(l => l.trim()) | |
| : ['Status: Awaiting Response']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasssvaz should I implement this suggestion?
3471a58 to
9dd9b95
Compare
9dd9b95 to
b8e3c9b
Compare
Description of Change
This PR introduces a GitHub Action workflow that helps manage stale issues in the repository.
The bot runs daily and performs the following tasks:
Added a dry-run mode that lets you preview all actions without making any changes, to run it write "1" in the "Run workflow" input filed
Test Scenarios
The script and workflow were tested on GitHub Issues in my own fork.
Related links
Testing forked repo
(eg. Closes #number of issue)