From 46ce210e5df8f4ad89ddc864bbedbc459019f966 Mon Sep 17 00:00:00 2001 From: Anerudhan Gopal Date: Mon, 24 Aug 2026 10:45:21 -0700 Subject: [PATCH] Add stale-PR automation workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mark PRs with no activity for 3 weeks as stale, and close them after 6 weeks of total inactivity. Any activity — a comment, a push, or a maintainer removing the stale label — resets the clock. Issues are not affected. Co-Authored-By: Claude Fable 5 --- .github/workflows/stale.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..35f7ba264 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,33 @@ +name: Mark and close stale PRs + +on: + schedule: + - cron: "30 2 * * *" + workflow_dispatch: + +permissions: + # PR labels and comments go through the issues API + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # PRs only — leave issues untouched + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 21 + days-before-pr-close: 21 + stale-pr-label: stale + close-pr-label: closed-stale + stale-pr-message: > + This PR has been inactive for 3 weeks and is now marked stale. + It will be closed in 3 more weeks unless there is new activity + (a comment, a push, or removal of the stale label). + close-pr-message: > + Closing this PR after 6 weeks of inactivity. Feel free to reopen + or open a new PR when you're ready to continue. + remove-stale-when-updated: true