Skip to content
Latchkey

actions/stale

Automatically mark and close stale issues and pull requests.

Official actionCategory: Pull Request AutomationLatest v9View on GitHub

What it does

actions/stale runs on a schedule, adds a stale label and comment to issues/PRs with no recent activity, and closes them if they stay inactive.

It has a per-run operations budget so a large backlog is processed over several runs.

Usage

workflow (.yml)
on:
  schedule:
    - cron: '0 1 * * *'
permissions:
  issues: write
  pull-requests: write
jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          days-before-stale: 60
          days-before-close: 7

Inputs

InputDescriptionDefaultRequired
days-before-staleDays of inactivity before marking stale.60No
days-before-closeDays after stale before closing.7No
stale-issue-labelLabel applied when stale.StaleNo
exempt-issue-labelsLabels that exempt an issue.-No
operations-per-runAPI operation budget per run.30No

Notes

Runs best on a schedule. Needs issues: write and pull-requests: write.

Common errors

  • Only a few items processed per run is expected; raise operations-per-run or let it catch up over days.

Security and pinning

  • Grant only issues/pull-requests write. Pin the action SHA.

Alternatives and related

Frequently asked questions

Why does stale only touch a few issues per run?
It has an operations-per-run budget (default 30) to stay within API limits. It processes the rest on subsequent scheduled runs.

References

Running actions/stale? Run it on Latchkey managed runners - self-healing and caching included. Start free → 30-day trial · No credit card