Stale Bots & Issue Hygiene Guide
# Add to .github/workflows/stale.yml: the official actions/stale workflow
Issue trackers decay: issues linger for months, PRs go stale, and the open-issue count becomes a liability for recruitment and trust. The stale bot comments after N days of inactivity, warns, then closes after a grace period: and it exempts labels you actually care about.
The humane configuration matters as much as the automation: exempt "good first issue" and roadmap labels, close with a template that invites reopening, and use a long grace period. A tidied tracker is the cheapest thing a maintainer can automate: and the labels it protects are exactly the ones on your contributor funnel.
Setup
name: Mark stale issues and PRs
on:
schedule:
- cron: "30 1 * * *"
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: "Marked stale due to inactivity."
stale-pr-message: "Marked stale: please rebase or close."Configuration
with: days-before-stale: 90 days-before-close: 14 operations-per-run: 100 ascending: true exempt-all-milestones: true
Exemptions
with:
exempt-issue-labels: |
good first issue
help wanted
roadmap
security
exempt-pr-labels: |
wip
security
stale-issue-label: "stale"
stale-pr-label: "stale"Templates
with:
close-issue-message: |
This issue has been closed for inactivity.
We value your report: comment to reopen
and a maintainer will take another look.
close-pr-message: |
Closing for inactivity. Rebase, push,
and the bot will revisit: or open a new PR.