From 5259fd11204eed4251267ecd16e016156a3614e3 Mon Sep 17 00:00:00 2001 From: James Russo Date: Fri, 6 Nov 2026 00:42:34 +0000 Subject: [PATCH] chore(ci): close PRs and needs-info issues after three weeks without activity (#7280) Mark stale at 14 days, close 7 days later. Drafts, keep-open, and Renovate PRs (now labeled dependencies) are exempt, since closing a Renovate PR makes it skip that update. Co-authored-by: Claude Opus 5.5 (1M context) --- .github/renovate.json | 1 + .github/workflows/stale.yml | 45 +++++++++++++++++++++++++++++++++++++ TRIAGE.md | 6 +++++ 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/renovate.json b/.github/renovate.json index 820d0e57fc..a22cf41fd6 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -6,6 +6,7 @@ "prConcurrentLimit": 5, "prHourlyLimit": 2, "rangeStrategy": "bump", + "labels": ["dependencies"], "lockFileMaintenance": { "enabled": true, "schedule": ["before 6am on monday"] diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..cea5f1b30f --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,45 @@ +name: Stale + +# Nudges, then closes, PRs and needs-info issues nobody has touched in two weeks. +# Any push, comment or label change resets the clock. Rules: TRIAGE.md, "Stale PRs and issues". +on: + schedule: + - cron: "17 9 * * *" + workflow_dispatch: + +permissions: + actions: write + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 + with: + days-before-pr-stale: 14 + days-before-pr-close: 7 + stale-pr-label: stale + stale-pr-message: >- + This PR has had no activity for 14 days, so it is marked stale and will close in 7 days. + Push a commit or leave a comment to keep it open. A maintainer can add `keep-open` to exempt it. + close-pr-message: >- + Closed after 21 days without activity. Reopen it, or open a new PR, whenever you pick it back up. + exempt-draft-pr: true + # Renovate labels its PRs; closing one would make it skip that update. + exempt-pr-labels: keep-open,dependencies,security + # Issues: only the ones waiting on the reporter for information. + only-issue-labels: triage/needs-info + days-before-issue-stale: 14 + days-before-issue-close: 7 + stale-issue-label: stale + stale-issue-message: >- + This issue is waiting on the information requested above and has had no activity for 14 days. + It will close in 7 days unless someone adds a comment. + close-issue-message: >- + Closed because the requested information didn't arrive. Comment with the details and we'll reopen it. + close-issue-reason: not_planned + exempt-issue-labels: keep-open + operations-per-run: 100 diff --git a/TRIAGE.md b/TRIAGE.md index 8ffa557ff3..a7abb06b0b 100644 --- a/TRIAGE.md +++ b/TRIAGE.md @@ -96,6 +96,12 @@ When a PR merges, verify whether it resolves the full issue and whether the fix Keep the advertised queue within actual mentoring and review capacity. Track time to first useful response, duplicate implementations, blocked contributors, and review follow-through. Improve task preparation before adding more labels or automation. +### Stale PRs and issues + +`.github/workflows/stale.yml` runs daily. A PR with no activity for 14 days gets the `stale` label and a comment, and closes 7 days later. Any push, comment or label change resets the clock. Issues follow the same timing, but only those labeled `triage/needs-info`. Drafts and PRs labeled `keep-open`, `dependencies` (Renovate) or `security` are exempt. + +When a stale close frees an issue, recheck it and restore `help wanted` (and `good first issue` if it still qualifies) so someone else can take it. + ### Useful GitHub searches Run these in this repository's issue search: