From 52576d64c46f285caec0cbf103f6745068a26259 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Mon, 22 May 2023 19:48:49 +1000 Subject: [PATCH] chore(github): Auto close pending closure issues --- .github/stale.yml | 17 ----------------- .github/workflows/auto_close.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/auto_close.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 38fce078d..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 180 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 90 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - Bug -# Label to use when marking an issue as stale -staleLabel: 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: false diff --git a/.github/workflows/auto_close.yml b/.github/workflows/auto_close.yml new file mode 100644 index 000000000..ebcd607c8 --- /dev/null +++ b/.github/workflows/auto_close.yml @@ -0,0 +1,25 @@ +name: 'Auto-close marked issues' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v8 + with: + # Issue closure message + close-issue-message: 'This issue has been closed due to no activity in over four weeks after having been marked as closure pending.' + # Issue close reason + close-issue-reason: not_planned + # Do not mark issues or PRs as stale automaticaly + days-before-stale: -1 + # Close issue/PR if no activity for four weeks after closure pending warning + days-before-close: 28 + # Do not auto close PRs + days-before-pr-close: -1 + # Do not auto-close an issue if it is assigned to a milestone + exempt-all-issue-milestones: true + # Stale issue label + stale-issue-label: 'closing 🚪'