From 1e3540e1104516e95e7a1c9c4eca9179bf91c84c Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 24 Aug 2023 09:28:40 -0700 Subject: [PATCH 1/2] Add stale bot Signed-off-by: Maksym Pavlenko --- .github/workflows/stale.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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 000000000..f73e80cd5 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,35 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: "0 0 * * *" # Every day at midnight + pull_request: + paths: + - '.github/workflows/stale.yml' + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8 + # All stale bot options: https://github.com/actions/stale#all-options + with: + # Idle number of days before marking issues/PRs stale + days-before-stale: 90 + # Idle number of days before closing stale issues/PRs + days-before-close: 7 + # Only issues/PRs with ANY of these labels are checked + any-of-labels: 'status/more-info-needed,status/needs-update' + # Comment on the staled issues + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + # Comment on the staled PRs + stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + # Comment on the staled issues while closed + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' + # Comment on the staled PRs while closed + close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.' + # Enable dry-run when changing this file from a PR. + debug-only: github.event_name == 'pull_request' From b4f487ce9dbda7f044b33804821a561302b97e7e Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 24 Aug 2023 09:56:17 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Samuel Karp Signed-off-by: Maksym Pavlenko --- .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 f73e80cd5..22a60e77a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -24,9 +24,9 @@ jobs: # Only issues/PRs with ANY of these labels are checked any-of-labels: 'status/more-info-needed,status/needs-update' # Comment on the staled issues - stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. This issue will be closed in 7 days unless new comments are made or the stale label is removed.' # Comment on the staled PRs - stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed.' # Comment on the staled issues while closed close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' # Comment on the staled PRs while closed