From 6c207855f46033200f75e13a3d22235dce0f6d32 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:49:35 +0000 Subject: [PATCH] ci(github): Close PRs with no activity after 5 days Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com> --- .github/workflows/stale-prs.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/stale-prs.yml diff --git a/.github/workflows/stale-prs.yml b/.github/workflows/stale-prs.yml new file mode 100644 index 000000000..fb1eee431 --- /dev/null +++ b/.github/workflows/stale-prs.yml @@ -0,0 +1,32 @@ +name: Stale PRs + +# Aggressive timer on purpose: a PR with no activity for 3 days gets a stale +# label, then closes 2 days later. Any push or comment resets the timer. +# Add the WIP label to opt a PR out. Issues are not touched. +on: + schedule: + - cron: "0 16 * * *" + workflow_dispatch: + +permissions: + actions: write + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 + with: + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 3 + days-before-pr-close: 2 + exempt-pr-labels: WIP + stale-pr-label: Stale + stale-pr-message: >- + This PR has had no activity for 3 days. It closes in 2 days + unless someone pushes, comments, or adds the `WIP` label. + close-pr-message: >- + Closed after 5 days with no activity. Reopen it to keep going.