From e7e77bb707a6eb99c1effa914c2e79d7b38a5252 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Tue, 30 Jun 2020 16:04:46 -0700 Subject: [PATCH 1/5] Adding "stale" GitHub Action Added the "stale" GitHub action to the CPython repo. PR's older than 30 days will be labeld as stale using the "stale-pr" label. If needed, it can be configured to more than 30 days. I've added bedevere-bot's GitHub token to the repo's secret settings as ``BEDEVERE_GH_TOKEN`` Closes https://github.com/python/core-workflow/issues/372 --- .github/workflows/stale.yml | 19 +++++++++++++++++++ 1 file changed, 19 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 00000000000000..8257af0ee58a20 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v3.0.7 + with: + repo-token: ${{ secrets.BEDEVERE_GH_TOKEN }} + stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' + stale-pr-label: 'stale-pr' + days-before-stale: 30 + days-before-close: 5 From 1f0341a907c0e183d846e6ba13a2383e6c8de719 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 2 Jul 2020 12:39:22 -0700 Subject: [PATCH 2/5] Update .github/workflows/stale.yml Co-authored-by: Brett Cannon --- .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 8257af0ee58a20..cab42ca7f46879 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/stale@v3.0.7 with: - repo-token: ${{ secrets.BEDEVERE_GH_TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' stale-pr-label: 'stale-pr' days-before-stale: 30 From 57ac1251dd11b965f3fc28087757bfea59a3f00f Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 2 Jul 2020 12:40:07 -0700 Subject: [PATCH 3/5] Update .github/workflows/stale.yml Co-authored-by: Brett Cannon --- .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 cab42ca7f46879..94713b60e455be 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3.0.7 + - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' From 2a348c453954cbe7c2654a99a18bf08ee2826fc0 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 2 Jul 2020 12:40:15 -0700 Subject: [PATCH 4/5] Update .github/workflows/stale.yml Co-authored-by: Brett Cannon --- .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 94713b60e455be..73199590ddf6ca 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,6 +14,6 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' - stale-pr-label: 'stale-pr' + stale-pr-label: 'stale' days-before-stale: 30 days-before-close: 5 From baa69093581858542d1ebe58ac8b76347f99ac2d Mon Sep 17 00:00:00 2001 From: Mariatta Date: Mon, 14 Dec 2020 15:09:11 -0800 Subject: [PATCH 5/5] Set days-before-close to -1 --- .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 73199590ddf6ca..706d8e11a20735 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -16,4 +16,4 @@ jobs: stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' stale-pr-label: 'stale' days-before-stale: 30 - days-before-close: 5 + days-before-close: -1