# Post-1.0 cadence per GIT_FLOW.md decision #4 (90d stale, 30d close).
name: Stale

on:
  schedule:
    - cron: "17 3 * * *"
  workflow_dispatch:

permissions:
  contents: read

jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      contents: write # delete-branch removes the head branch of a PR it closes
      issues: write
      pull-requests: write
    steps:
      - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11
        with:
          days-before-stale: 90
          days-before-close: 30
          delete-branch: true
          exempt-issue-labels: priority/p0-critical,priority/p1-high,status/blocked,pinned,type/bug
          exempt-pr-labels: priority/p0-critical,priority/p1-high,status/blocked,pinned
          operations-per-run: 30
          stale-issue-message: This issue has had no activity for 90 days and is marked stale. Comment to keep it open.
          stale-pr-message: This pull request has had no activity for 90 days and is marked stale. Update it to keep it open.
          close-issue-message: This issue is being closed after 30 more days without activity.
          close-pr-message: This pull request is being closed after 30 more days without activity.
