name: Mark stale issues and pull requests

on:
  schedule:
  - cron: "30 1 * * *"

jobs:
  stale:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/stale@v8
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}

        stale-issue-message: 'This issue has not been active in 120 days and has been marked "stale". Remove stale label or comment or this will be closed in 15 days'
        stale-issue-label: 'stale'
        exempt-issue-labels: 'has fix,help wanted'

        stale-pr-message: 'This pull request has not been active in 120 days and has been marked "stale". Remove stale label or comment or this will be closed in 15 days'
        stale-pr-label: 'stale'
        exempt-pr-labels: 'has fix,help wanted'
        
        days-before-stale: 120
        days-before-close: 15
