We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime. Privacy policy

Skip to content
devvkit
$devvkit learn --librarie stale-bots-&-issue-hygiene-guide

Stale Bots & Issue Hygiene Guide

[oss-stack][maintainer][github-actions][automation]
Open Source
Install
# 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

The workflow file· The canonical actions/stale job.
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

Tune the rhythm· Days before marking and before closing.
with:
  days-before-stale: 90
  days-before-close: 14
  operations-per-run: 100
  ascending: true
  exempt-all-milestones: true

Exemptions

Protect essential labels· Never stale what drives your funnel.
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

Close with a template· Outgoing contributors deserve a nice note.
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.