name: 'Close stale issues and PRs'
on:
  schedule:
    - cron: '30 1 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          stale-pr-message: 'This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
          stale-issue-label: 'S-stale'
          exempt-pr-labels: 'S-exempt-stale'
          days-before-issue-stale: 999
          days-before-pr-stale: 14
          days-before-close: 5
          repo-token: ${{ secrets.GITHUB_TOKEN }}