From 0266b77cd509e1ea0f897a7798766cb3433c9357 Mon Sep 17 00:00:00 2001 From: Abhishek Pal Date: Wed, 11 Mar 2026 14:44:19 +0530 Subject: [PATCH 1/4] RATIS-2432. Close PRs after three months of inactivity --- .github/workflows/close-stale-pr.yaml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/close-stale-pr.yaml diff --git a/.github/workflows/close-stale-pr.yaml b/.github/workflows/close-stale-pr.yaml new file mode 100644 index 0000000000..46addcd02d --- /dev/null +++ b/.github/workflows/close-stale-pr.yaml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: close-stale-prs + +on: + schedule: + # We can run this only once a week on Sundays so contributors get sufficient time to follow up. + - cron: '0 0 * * 0' + +jobs: + close-stale-prs: + permissions: + pull-requests: write + runs-on: ubuntu-slim + steps: + - name: Close Stale PRs + uses: actions/stale@v10 + with: + stale-pr-label: 'stale' + exempt-draft-pr: false + days-before-issue-stale: -1 + days-before-pr-stale: 77 + days-before-pr-close: 14 + remove-pr-stale-when-updated: true + operations-per-run: 500 + stale-pr-message: 'This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.' + close-pr-message: 'Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.' \ No newline at end of file From 1f798013bff3991b39c754325a6070f4819f2783 Mon Sep 17 00:00:00 2001 From: Abhishek Pal Date: Thu, 12 Mar 2026 23:25:47 +0530 Subject: [PATCH 2/4] Update stale PR message --- .github/workflows/close-stale-pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-stale-pr.yaml b/.github/workflows/close-stale-pr.yaml index 46addcd02d..be68f9a985 100644 --- a/.github/workflows/close-stale-pr.yaml +++ b/.github/workflows/close-stale-pr.yaml @@ -35,5 +35,5 @@ jobs: days-before-pr-close: 14 remove-pr-stale-when-updated: true operations-per-run: 500 - stale-pr-message: 'This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.' - close-pr-message: 'Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.' \ No newline at end of file + stale-pr-message: 'This PR has been marked as stale due to 77 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in ~14 days.' + close-pr-message: 'Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.' From c59b124bf53df3636e1ca9f38795024576c68144 Mon Sep 17 00:00:00 2001 From: Abhishek Pal Date: Fri, 27 Mar 2026 16:04:30 +0530 Subject: [PATCH 3/4] address review comments --- .github/workflows/close-stale-pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-stale-pr.yaml b/.github/workflows/close-stale-pr.yaml index be68f9a985..8dd9129a81 100644 --- a/.github/workflows/close-stale-pr.yaml +++ b/.github/workflows/close-stale-pr.yaml @@ -31,8 +31,8 @@ jobs: stale-pr-label: 'stale' exempt-draft-pr: false days-before-issue-stale: -1 - days-before-pr-stale: 77 - days-before-pr-close: 14 + days-before-pr-stale: 60 + days-before-pr-close: 30 remove-pr-stale-when-updated: true operations-per-run: 500 stale-pr-message: 'This PR has been marked as stale due to 77 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in ~14 days.' From cc46d5da2a8d46057cd879fe9d9245d6a44850c6 Mon Sep 17 00:00:00 2001 From: Abhishek Pal Date: Fri, 27 Mar 2026 18:23:22 +0530 Subject: [PATCH 4/4] Update close-stale-pr.yaml Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com> --- .github/workflows/close-stale-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close-stale-pr.yaml b/.github/workflows/close-stale-pr.yaml index 8dd9129a81..6c24bf0e51 100644 --- a/.github/workflows/close-stale-pr.yaml +++ b/.github/workflows/close-stale-pr.yaml @@ -35,5 +35,5 @@ jobs: days-before-pr-close: 30 remove-pr-stale-when-updated: true operations-per-run: 500 - stale-pr-message: 'This PR has been marked as stale due to 77 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in ~14 days.' + stale-pr-message: 'This PR has been marked as stale due to 60 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in ~30 days.' close-pr-message: 'Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.'