Repository navigation
Open
Labels
area:automationmigrate:area:automationAutomation workflows and agentsAutomation workflows and agentsmigrate:priority:normalDefault priorityDefault prioritymigrate:type:taskTask or to-doTask or to-dopriority:normaltype:task
Milestone
Description
Task: Implement manage-stale-issues.js
Phase: 1.4 | Duration: 4-5 hours | Parent: PR #1717
Purpose: Apply meta:stale label and optionally auto-archive inactive issues
Acceptance Criteria
- Finds inactive issues correctly (30+ day threshold)
- Respects exclusion rules
- Posts warning comments
- Optional auto-close capability
- 12+ unit tests passing
Exclusion Rules
Don't mark stale if issue has:
type:epic(long-running)status:in-progress(actively worked)priority:critical(security/urgent)- Assigned to a milestone (planned work)
Implementation
Create scripts/automation/manage-stale-issues.js:
- Find issues with no activity for N days (default 30)
- Apply
meta:stalelabel - Optionally post warning comment
- Optionally close and archive
- Report actions taken
Create scripts/automation/__tests__/manage-stale-issues.test.js:
- Test activity detection
- Test exclusion rules
- Test label application
- Test comment generation
- Test auto-close logic
Validation
# Dry-run (show which issues would be marked)
node scripts/automation/manage-stale-issues.js --dry-run --days 30
# Apply stale label
node scripts/automation/manage-stale-issues.js --days 30
# Apply + post warning comment
node scripts/automation/manage-stale-issues.js --days 30 --warnSuccess Metrics
- ✅ 12+ unit tests passing
- ✅ 80%+ code coverage
- ✅ Exclusion rules working correctly
- ✅ Handles timezone-aware timestamps
Related: PR #1717, OPENSPEC section 3.3
Built by Claude Code with ☕, 🚀, and open-source spirit!
Definition of Ready (DoR)
- Clear problem statement and expected outcome
- Acceptance criteria defined
- Related issues/dependencies identified
- Required resources/approvals listed
Definition of Done (DoD)
- All acceptance criteria met
- Changes tested and validated
- Documentation updated
- Changes merged and deployed
- Stakeholders notified
Metadata
Metadata
Assignees
Labels
area:automationmigrate:area:automationAutomation workflows and agentsAutomation workflows and agentsmigrate:priority:normalDefault priorityDefault prioritymigrate:type:taskTask or to-doTask or to-dopriority:normaltype:task
Type
Fields
Priority
None yet
Activity
linear-code commentedon Aug 10, 2026
LS-2429
github-actions commentedon Aug 10, 2026
✅ Template check passed after update. Thanks for fixing the issue body.
github-actions commentedon Aug 10, 2026
⏱️ Aging and SLA annotation
Maintained by project-meta-sync workflow.
feat: Phase 1.3 - Implement manage-stale-issues.js script
feat: Phase 1.4 Status Label Audit Script (#1727)