From 17af8e97be52466c69a413ad75e4d6f21e6a69bc Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Thu, 25 Jun 2026 16:34:24 +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. Adds .github/actionlint.yaml to declare ubuntu-slim as a known self-hosted runner label, silencing the actionlint runner-label warning. Ticket: AI-595 Session-Id: 0b91aa81-3ac0-4542-9279-6c56f778d001 Task-Id: dc650354-37d7-49f1-a77f-25aa8d4ea0f9 --- .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