From b798520ba757727b78705ac9f6fa452653172a4d Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 24 Feb 2022 09:29:39 +0000 Subject: [PATCH] Chore: Add github action to manage stale PRs (#45766) * Add github action to manage stale PRs * Update days before close --- .github/stale.yml | 47 ------------------------------------- .github/workflows/stale.yml | 32 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 47 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 701b0b260d0..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# General configuration -# Label to use when marking as stale -staleLabel: stale - -# Pull request specific configuration -pulls: - # Number of days of inactivity before an Issue or Pull Request becomes stale - daysUntilStale: 14 - # Number of days of inactivity before a stale Issue or Pull Request is closed. - # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. - daysUntilClose: 30 - # Comment to post when marking as stale. Set to `false` to disable - markComment: > - This pull request has been automatically marked as stale because it has not had - activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please - feel free to give a status update now, ping for review, or re-open when it's ready. - Thank you for your contributions! - # Comment to post when closing a stale Issue or Pull Request. - closeComment: > - This pull request has been automatically closed because it has not had - activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. - Thank you for your contributions! - # Limit the number of actions per hour, from 1-30. Default is 30 - limitPerRun: 1 - -exemptLabels: - - help wanted - - type/bug - - type/feature-request - - Epic - - no stalebot - -# Issue specific configuration -issues: - limitPerRun: 1 - daysUntilStale: 100000 - daysUntilClose: 100000 - markComment: > - This issue has been automatically marked as stale because it has not had activity in the - last 100 days. It will be closed in the next 100 days if no activity occurs. - Thank you for your contributions. - closeComment: > - This issue has been automatically closed because it has not had activity in the - last month and a half. If this issue is still valid, please ping a maintainer and ask them to check this again. - Thank you for your contributions. diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..85335b924d8 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,32 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4 + with: + repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }} + # Number of days of inactivity before a stale Issue or Pull Request is closed. + # Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. + days-before-close: 14 + # Number of days of inactivity before an Issue or Pull Request becomes stale + days-before-stale: 30 + # We don't want any Issues to be marked as stale for now. + days-before-issue-stale: -1 + exempt-issue-label: no stalebot + exempt-pr-label: no stalebot + stale-issue-label: stale + stale-pr-label: stale + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please + feel free to give a status update now, ping for review, or re-open when it's ready. + Thank you for your contributions! + close-pr-message: > + This pull request has been automatically closed because it has not had + activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. + Thank you for your contributions!