From 0402f0a6fcaa12acebc239f4d4760e6faf595e74 Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Sun, 13 Sep 2020 09:59:47 -0500 Subject: [PATCH 1/9] CI: Add stale PR action --- .github/workflows/stale-pr.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/stale-pr.yml diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml new file mode 100644 index 0000000000000..036bc3952f7d4 --- /dev/null +++ b/.github/workflows/stale-pr.yml @@ -0,0 +1,15 @@ +name: "Close stale pull requests" +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-pr-message: "This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." + days-before-stale: 30 + days-before-close: 5 From 96002e058fd58a698095dd752bc108ee8da7cfac Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Sun, 13 Sep 2020 11:38:23 -0500 Subject: [PATCH 2/9] Update debug options --- .github/workflows/stale-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 036bc3952f7d4..4c36dfcebba9b 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -12,4 +12,5 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." days-before-stale: 30 - days-before-close: 5 + days-before-close: -1 + debug-only: true From 98263dd426c17eaeed4ff87db2f09f6023574068 Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Sun, 13 Sep 2020 16:17:12 -0500 Subject: [PATCH 3/9] Update --- .github/workflows/stale-pr.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 4c36dfcebba9b..08433266bcbcd 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -1,7 +1,8 @@ -name: "Close stale pull requests" +name: "Manage stale pull requests" on: schedule: - - cron: "0 0 * * *" + # * is a special character in YAML so you have to quote this string + - cron: "0 */6 * * *" jobs: stale: @@ -10,7 +11,7 @@ jobs: - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." + stale-pr-message: "This pull request is stale because it has been open for 30 days with no activity. Please update to prevent this from being closed." days-before-stale: 30 days-before-close: -1 debug-only: true From 9765d43a69dac09fd086d88b15d6c3ebcfd6c1ca Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Sun, 13 Sep 2020 16:45:05 -0500 Subject: [PATCH 4/9] Nicer wording --- .github/workflows/stale-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 08433266bcbcd..e822db8c8c5df 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -1,4 +1,4 @@ -name: "Manage stale pull requests" +name: "Stale PRs" on: schedule: # * is a special character in YAML so you have to quote this string @@ -11,7 +11,7 @@ jobs: - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request is stale because it has been open for 30 days with no activity. Please update to prevent this from being closed." + stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity. Please update to prevent this from being closed (you can always reopen later). If you need help don't hesitate to contact one of the maintainers." days-before-stale: 30 days-before-close: -1 debug-only: true From 315b7c675eeab52f4055169f54f49d07648e1455 Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Mon, 14 Sep 2020 07:17:07 -0500 Subject: [PATCH 5/9] Use label, update wording --- .github/workflows/stale-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index e822db8c8c5df..822e8899dc02b 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -11,7 +11,8 @@ jobs: - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity. Please update to prevent this from being closed (you can always reopen later). If you need help don't hesitate to contact one of the maintainers." + stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity." + stale-pr-label: "Stale" days-before-stale: 30 days-before-close: -1 debug-only: true From 4c492f44a75522a837628111a38f63978a05167b Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Mon, 14 Sep 2020 07:43:26 -0500 Subject: [PATCH 6/9] Exempt label --- .github/workflows/stale-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 822e8899dc02b..a5d4f982c00da 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -13,6 +13,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity." stale-pr-label: "Stale" + exempt-pr-labels: "Needs Review" days-before-stale: 30 days-before-close: -1 debug-only: true From 885fefbf92551f371c69bca0bd03f27a0ac2a900 Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Mon, 14 Sep 2020 11:26:56 -0500 Subject: [PATCH 7/9] Add remove stale option This is the default, but just being explicit about it --- .github/workflows/stale-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index a5d4f982c00da..1c9884f7e2d20 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -16,4 +16,5 @@ jobs: exempt-pr-labels: "Needs Review" days-before-stale: 30 days-before-close: -1 + remove-stale-when-updated: true debug-only: true From 17f3dec812e7d91e79672545d3f7050140ccbf1a Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Mon, 14 Sep 2020 13:49:30 -0500 Subject: [PATCH 8/9] Exempt blocked --- .github/workflows/stale-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 1c9884f7e2d20..71db9a372dbd5 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -13,7 +13,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity." stale-pr-label: "Stale" - exempt-pr-labels: "Needs Review" + exempt-pr-labels: "Needs Review,Blocked" days-before-stale: 30 days-before-close: -1 remove-stale-when-updated: true From 2066a98bf4cf88836f64ba431e53aef524f4a749 Mon Sep 17 00:00:00 2001 From: Daniel Saxton Date: Mon, 14 Sep 2020 13:53:30 -0500 Subject: [PATCH 9/9] Set skip option explicitly --- .github/workflows/stale-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 71db9a372dbd5..0cbe4b7dd4582 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -12,6 +12,7 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity." + skip-stale-pr-message: false stale-pr-label: "Stale" exempt-pr-labels: "Needs Review,Blocked" days-before-stale: 30