From 71fb7a8ef0df54f730d93b43d67df8082f991675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Mon, 8 Jan 2024 22:35:56 +0100 Subject: [PATCH 1/7] Introduce stale bot action --- .github/workflows/stale.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 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 00000000000..ef3af511adf --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,37 @@ +# This workflow warns of PRs that have had no activity for a specified amount of time. +# +# For more information, see https://github.com/actions/stale +name: Mark stale pull requests + +on: + # Run every day at 00:00 UTC + schedule: + - cron: '0 0 * * *' + # Or run on demand + workflow_dispatch: + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + pull-requests: write + + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + days-before-pr-stale: 14 + days-before-issue-stale: -1 # we don't use issues + days-before-close: -1 # don't close stale PRs/issues + exempt-draft-pr: true # don't mark draft PRs as stale + + stale-pr-message: > + This PR has not had activity in the past 2 weeks, labeling it as stale. + If the PR is waiting for review, notify the dev@solr.apache.org list. + Thank you for your contribution! + + # TODO: Adjust budget and debug after initial testing + operations-per-run: 500 # operations budget + debug-only: true # turn on to run the action without applying changes \ No newline at end of file From 3b163034fcca8ca0752f568daf7cc62de36fc881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Mon, 8 Jan 2024 22:44:19 +0100 Subject: [PATCH 2/7] Re-word stale message --- .github/workflows/stale.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ef3af511adf..ddbb0cc8cb0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -29,7 +29,8 @@ jobs: stale-pr-message: > This PR has not had activity in the past 2 weeks, labeling it as stale. - If the PR is waiting for review, notify the dev@solr.apache.org list. + Any new activity will remove the stale label. To attract more reviewers, tag + someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution! # TODO: Adjust budget and debug after initial testing From e8fe02b26e65becce5c9638b4a07453b263962b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Mon, 8 Jan 2024 22:50:38 +0100 Subject: [PATCH 3/7] Use lowercase stale label --- .github/workflows/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ddbb0cc8cb0..2d9c9c557fe 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -26,6 +26,7 @@ jobs: days-before-issue-stale: -1 # we don't use issues days-before-close: -1 # don't close stale PRs/issues exempt-draft-pr: true # don't mark draft PRs as stale + stale-pr-label: "stale" # label to use when marking as stale stale-pr-message: > This PR has not had activity in the past 2 weeks, labeling it as stale. From b6f2c18af31cfbab1f3c3f90e5e035a8bff7f7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Wed, 10 Jan 2024 00:17:49 +0100 Subject: [PATCH 4/7] Update .github/workflows/stale.yml Co-authored-by: Christine Poerschke --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2d9c9c557fe..bf25693b34f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -29,7 +29,7 @@ jobs: stale-pr-label: "stale" # label to use when marking as stale stale-pr-message: > - This PR has not had activity in the past 2 weeks, labeling it as stale. + This PR had no visible activity in the past 2 weeks, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution! From a47cc76254b3dc476423a9e59bca4c044acfcf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Wed, 10 Jan 2024 00:22:07 +0100 Subject: [PATCH 5/7] Update .github/workflows/stale.yml Co-authored-by: Christine Poerschke --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bf25693b34f..2bee4dcbbf3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -30,7 +30,7 @@ jobs: stale-pr-message: > This PR had no visible activity in the past 2 weeks, labeling it as stale. - Any new activity will remove the stale label. To attract more reviewers, tag + Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution! From de1f785d5d81e613dbde78e5c992324a1273d6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 23 Jan 2024 09:50:27 +0100 Subject: [PATCH 6/7] Change to 30 days --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2bee4dcbbf3..77cbbbec29d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -22,14 +22,14 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-pr-stale: 14 + days-before-pr-stale: 30 days-before-issue-stale: -1 # we don't use issues days-before-close: -1 # don't close stale PRs/issues exempt-draft-pr: true # don't mark draft PRs as stale stale-pr-label: "stale" # label to use when marking as stale stale-pr-message: > - This PR had no visible activity in the past 2 weeks, labeling it as stale. + This PR had no visible activity in the past 30 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution! From 0dbd2ed194e886657d8c093dc3ced8129e4caa6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Fri, 26 Jan 2024 16:24:54 +0100 Subject: [PATCH 7/7] Increase to 60 days and test with labeling 10 PRs each day --- .github/workflows/stale.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 77cbbbec29d..4331aa2676e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -22,18 +22,17 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-pr-stale: 30 + days-before-pr-stale: 60 days-before-issue-stale: -1 # we don't use issues days-before-close: -1 # don't close stale PRs/issues exempt-draft-pr: true # don't mark draft PRs as stale stale-pr-label: "stale" # label to use when marking as stale stale-pr-message: > - This PR had no visible activity in the past 30 days, labeling it as stale. + This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the dev@solr.apache.org mailing list. Thank you for your contribution! - # TODO: Adjust budget and debug after initial testing - operations-per-run: 500 # operations budget - debug-only: true # turn on to run the action without applying changes \ No newline at end of file + # TODO: Increase budget after initial testing + operations-per-run: 10 # operations budget