From 94cecd44791cdf29aa7d103511e25b01187b6783 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 23 Aug 2024 13:10:21 -0400 Subject: [PATCH 1/2] Move from stale bot to stale action --- .github/stale.yml | 19 -------------- .github/workflows/cron-stale.yml | 44 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 19 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/cron-stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 1853ab92ea79..000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - :hourglass: Long Term -# Label to use when marking an issue as stale -staleLabel: - - :snowflake: Stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. If there are no updates within 7 days, it will be closed. - You can add the "Long Term" label to prevent the Stale bot from closing - this issue. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: Closing due to inactivity - diff --git a/.github/workflows/cron-stale.yml b/.github/workflows/cron-stale.yml new file mode 100644 index 000000000000..d3bd1e23ce4f --- /dev/null +++ b/.github/workflows/cron-stale.yml @@ -0,0 +1,44 @@ +name: 'Close stale issues and PR' +on: + schedule: + - cron: '30 1 * * *' + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 60 + stale-issue-message: > + This issue has been automatically marked as stale because it + has not had activity in the last 60 days. If there are no + updates within 7 days, it will be closed. You can add the + ":hourglass: Long Term" label to prevent the stale action + from closing this issue. + days-before-issue-close: 7 + close-issue-message: > + This issue was closed because it has been stalled for 7 days with no activity. + You can reopen this issue if you are still working on it. + stale-issue-label: ':snowflake: Stale' + exempt-issue-labels: ':hourglass: Long Term' + + days-before-pr-stale: 60 + stale-pr-message: > + This PR has been automatically marked as stale because it + has not had activity in the last 60 days. If there are no + updates within 7 days, it will be closed. You can add the + ":hourglass: Long Term" label to prevent the stale action + from closing this issue. + days-before-pr-close: 30 + close-pr-message: > + This PR was closed because it has been stalled for 30 days with no activity. + You can reopen this PR if you are still working on it. + stale-pr-label: ':snowflake: Stale' + exempt-pr-labels: ':hourglass: Long Term' + From ffa9277e7491aeb60e82a1cf6c46a82798dfb76c Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 23 Aug 2024 13:13:23 -0400 Subject: [PATCH 2/2] Add comment --- .github/workflows/cron-stale.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cron-stale.yml b/.github/workflows/cron-stale.yml index d3bd1e23ce4f..1540b47b21c2 100644 --- a/.github/workflows/cron-stale.yml +++ b/.github/workflows/cron-stale.yml @@ -1,3 +1,6 @@ +# Based on examples from the stale action site: +# https://github.com/actions/stale + name: 'Close stale issues and PR' on: schedule: