name: Mark stale issues and pull requests

# Documentation
# https://github.com/marketplace/actions/close-stale-issues

on:
  push:
    paths:
      - .github/workflows/stale.yml
  schedule:
  - cron: "30 1 * * *"

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/stale@v3
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.'
        stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.'
        stale-issue-label: 'Stale'
        stale-pr-label: 'Stale'
        exempt-issue-labels: 'In Progress'
        exempt-pr-labels: 'In Progress'
        days-before-pr-stale: 90
        days-before-issue-stale: 365
        days-before-pr-close: 7
        days-before-issue-close: -1
        debug-only: false
