name: "Batch close stale issues"
on:
  workflow_dispatch:
    inputs:

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/stale@v4
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        # Close everything older than 1 year
        days-before-issue-stale: 365
        days-before-issue-close: 0
        exempt-issue-labels: do-not-autoclose
        close-issue-message: "In an effort to have a more manageable issue backlog, we're closing issues older than 1 year. If you think your request or report is still relevant and may benefit others, please open a new issue."
        ascending: true
        operations-per-run: 250