From def2378ee8707e8154ae641fc3e15f7f30f5bbc3 Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Thu, 25 Jun 2026 15:12:40 +0000 Subject: [PATCH] chore: add stale PR workflow Adds .github/workflows/close-stale-prs.yaml to mark PRs as stale after 7 days of inactivity and close them 7 days later. Draft PRs are exempt. This keeps the PR queue clean as AI agent throughput increases. Ticket: AI-595 Session-Id: b8d5e9df-80dc-4cbe-91f0-590831e14bb9 Task-Id: 3cbad070-b9c6-4af0-847d-e62d87686533 --- .github/actionlint.yaml | 3 +++ .github/workflows/close-stale-prs.yaml | 30 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/actionlint.yaml create mode 100644 .github/workflows/close-stale-prs.yaml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 00000000..f5709648 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,3 @@ +self-hosted-runner: + labels: + - ubuntu-slim diff --git a/.github/workflows/close-stale-prs.yaml b/.github/workflows/close-stale-prs.yaml new file mode 100644 index 00000000..4e0cdf4b --- /dev/null +++ b/.github/workflows/close-stale-prs.yaml @@ -0,0 +1,30 @@ +name: Close stale PRs + +on: + schedule: + - cron: '0 1 * * *' + workflow_dispatch: + +jobs: + stale: + runs-on: ubuntu-slim + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v10 + with: + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 7 + days-before-pr-close: 7 + stale-pr-label: stale + stale-pr-message: > + This PR has been marked as stale because it has had no activity for 7 days. + Remove the stale label or comment to keep it open. It will be closed + automatically in 7 more days if no activity occurs. + close-pr-message: > + This PR was closed automatically because it has been stale for 14 days with + no activity. + exempt-draft-pr: true + operations-per-run: 30