From 7249f277b2bb01ed9f0779733ab1893daec3518f Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Sat, 10 Sep 2022 16:09:43 +0800 Subject: [PATCH] ci: close issue that inactive more than 60 days [skip ci] --- .github/workflows/issue_check_inactive.yml | 3 ++- .github/workflows/issue_close_inactive.yml | 20 +++++++++++++++++++ ..._question.yml => issue_close_question.yml} | 4 ++-- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/issue_close_inactive.yml rename .github/workflows/{issue_check_question.yml => issue_close_question.yml} (87%) diff --git a/.github/workflows/issue_check_inactive.yml b/.github/workflows/issue_check_inactive.yml index f4233ca9..1b56c60c 100644 --- a/.github/workflows/issue_check_inactive.yml +++ b/.github/workflows/issue_check_inactive.yml @@ -13,4 +13,5 @@ jobs: with: actions: 'check-inactive' token: ${{ secrets.GITHUB_TOKEN }} - inactive-day: 30 \ No newline at end of file + inactive-day: 30 + body: Hello, this issue has been inactive for more than 30 days and will be closed if inactive for another 30 days. \ No newline at end of file diff --git a/.github/workflows/issue_close_inactive.yml b/.github/workflows/issue_close_inactive.yml new file mode 100644 index 00000000..f24911c5 --- /dev/null +++ b/.github/workflows/issue_close_inactive.yml @@ -0,0 +1,20 @@ +name: Close inactive + +on: + schedule: + - cron: "0 0 */7 * *" + +jobs: + close-inactive: + runs-on: ubuntu-latest + steps: + - name: close-issues + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + token: ${{ secrets.GITHUB_TOKEN }} + labels: 'inactive' + inactive-day: 30 + close-reason: 'not_planned' + body: | + Hello @${{ github.event.issue.user.login }}, this issue was closed due to inactive more than 60 days. You can reopen or recreate it if you think it should continue. \ No newline at end of file diff --git a/.github/workflows/issue_check_question.yml b/.github/workflows/issue_close_question.yml similarity index 87% rename from .github/workflows/issue_check_question.yml rename to .github/workflows/issue_close_question.yml index 5b2ddbb2..f323cb86 100644 --- a/.github/workflows/issue_check_question.yml +++ b/.github/workflows/issue_close_question.yml @@ -1,11 +1,11 @@ -name: Check need info +name: Close need info on: schedule: - cron: "0 0 */7 * *" jobs: - check-need-info: + close-need-info: runs-on: ubuntu-latest steps: - name: close-issues