name: 'Close stale issues and PRs'
on:
  schedule:
  - cron: '15 12 * * *' # 7:15 EST, early in a workday
  workflow_dispatch: {} # no parameters

jobs:
  stale:
    permissions:
      issues: write
      pull-requests: write

    runs-on: ubuntu-latest
    steps:
    - uses: actions/stale@v10
      with:
        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. Thank you
          for your contributions.
        close-issue-message: >
          This issue has been closed due to inactivity.
        stale-pr-message: >
          This PR has been automatically marked as stale because it has not had
          recent activity. It will be closed if no further activity occurs. Thank you
          for your contributions.
        close-pr-message: >
          This PR has been closed due to inactivity.
        days-before-stale: 90
        days-before-close: 7
        stale-issue-label: stale
        stale-pr-label: stale
        # These are comma-separated lists, if we ever want more than one.
        exempt-issue-labels: "acknowledged"
        exempt-pr-labels: "acknowledged"
        exempt-all-assignees: true
