From ea27fa7fee20aca20c74a9d8a80a68d5a2a12b64 Mon Sep 17 00:00:00 2001 From: Andrey Velichkevich Date: Mon, 21 Aug 2023 18:15:35 +0100 Subject: [PATCH] Add Stale GitHub Action (#2220) --- .github/stale.yml | 20 ----------------- .github/workflows/stale.yaml | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 20 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yaml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index bb751a3d851..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for stale probot https://probot.github.io/apps/stale/ - -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 90 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 20 -# Issues with these labels will never be considered stale -exemptLabels: - - lifecycle/frozen -# Label to use when marking an issue as stale -staleLabel: lifecycle/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. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - This issue has been automatically closed because it has not had recent - activity. Please comment "/reopen" to reopen it. diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 00000000000..f500b8c3931 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,43 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 16 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 90 + days-before-close: 20 + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + close-issue-message: > + This issue has been automatically closed because it has not had recent + activity. Please comment "/reopen" to reopen it. + stale-issue-label: lifecycle/stale + exempt-issue-labels: lifecycle/frozen + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + close-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + stale-pr-label: lifecycle/stale + exempt-pr-labels: lifecycle/frozen