From 9eb9089f6237ecb7eff21a2b7992936c50337f06 Mon Sep 17 00:00:00 2001 From: Opixelum <48217573+Opixelum@users.noreply.github.com> Date: Fri, 22 Apr 2022 16:33:24 +0200 Subject: [PATCH] feat: close stale issues and PRs Checks every day at 00:00 if there are some inactive issues or PRs since 30 days. If yes, they will be closed automatically after 5 days. --- .github/workflows/close-stale-issues-pr.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/close-stale-issues-pr.yml diff --git a/.github/workflows/close-stale-issues-pr.yml b/.github/workflows/close-stale-issues-pr.yml new file mode 100644 index 0000000..003f1b3 --- /dev/null +++ b/.github/workflows/close-stale-issues-pr.yml @@ -0,0 +1,18 @@ +name: 'Close stale issues and PRs with 30 days of inactivity' +on: + schedule: + - cron : '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v5.0.0 + with: + repo-token: ${{ secrets.GHPROJECT_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + close-pr-message: 'This pull request was closed because it has been stalled for 5 days with no activity.' + days-before-stale: 30 + days-before-close: 5