name: Mark stale pull requests

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

jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
    - uses: actions/stale@v10
      with:
        days-before-stale: 30
        days-before-close: 14
        stale-pr-label: "stale"
        exempt-pr-labels: "not stale"
        stale-pr-message: "This PR has been automatically marked as stale because it has not had any activity for 30 days. It will be closed in 14 days if no further activity occurs. Please comment on this PR to keep it open, or ask `@bazelbuild/bcr-maintainers` to add the `not stale` label if it's still relevant."
        close-pr-message: "This PR has been closed due to inactivity."
        exempt-draft-pr: false
        operations-per-run: 500
        ascending: true
