name: Stale Issues and PRs

on:
  schedule:
    - cron: 30 4 * * *

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/stale@v4
      with:
        exempt-all-milestones: true
        days-before-stale: 30
        days-before-close: 7

        stale-issue-message: >
          This issue has been automatically marked as stale because it
          has not had recent activity. It will be closed if no further activity occurs
          within a week.
        close-issue-message: Issue closed automatically as inactive.
        stale-issue-label: Inactive
        exempt-issue-labels: BUG,Feature Request,Pinned

        stale-pr-message: >
          This pull request has been automatically marked as stale because it
          has not had recent activity. It will be closed if no further activity occurs
          within a week.
        close-pr-message: Pull request closed automatically as inactive.
        stale-pr-label: Inactive
        exempt-pr-labels: Pinned
