name: Mark stale issues and pull requests

on:
  schedule:
    - cron: "35 23 * * *"

jobs:
  stale:
    if: github.repository == 'zhom/donutbrowser'
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write

    steps:
      - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          stale-issue-message: "This issue has been inactive for 30 days. Please respond to keep it open."
          stale-pr-message: "This pull request has been inactive for 30 days. Please respond to keep it open."
          stale-issue-label: "stale"
          stale-pr-label: "stale"
          days-before-stale: 30
          days-before-close: 7
          # Never let the maintainer's own assigned issues go stale or get
          # closed, regardless of inactivity.
          exempt-issue-assignees: "zhom"
