name: Stale issues and PRs

on:
  schedule:
    - cron: "0 6 * * 1"

permissions:
  issues: write
  pull-requests: write

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9.1.0
        with:
          stale-issue-message: >
            This issue has been automatically marked as inactive due to lack of
            recent activity. It will be closed in 14 days if no further activity
            occurs.
          stale-pr-message: >
            This PR has been automatically marked as inactive due to lack of
            recent activity. It will be closed in 14 days if no further activity
            occurs.
          stale-issue-label: "status: inactive"
          stale-pr-label: "status: inactive"
          days-before-stale: 60
          days-before-close: 14
          exempt-issue-labels: "pinned,keep"
          exempt-pr-labels: "pinned,keep"
