name: 'Close stale issues and PRs'
on:
  schedule:
    - cron: '30 1 * * MON-FRI' # 1:30 AM every weekday

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          stale-issue-message: 'This issue has been marked as stale because it has been open for 120 days without activity. Please remove the stale label or add a comment; otherwise, it will be closed in 7 days.'
          days-before-stale: 120
          days-before-close: 7
          exempt-issue-labels: bug
