From 112792de66d43391804f68aa3451a7da0b20b7b2 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 22 Mar 2025 09:45:48 +0800 Subject: [PATCH] chore(Action): add label check and auto close action --- .github/workflows/issue-check-inactive.yml | 26 ++++++++++++++++++++++ .github/workflows/issue-close-required.yml | 26 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/issue-check-inactive.yml create mode 100644 .github/workflows/issue-close-required.yml diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml new file mode 100644 index 00000000000..ac743f0102e --- /dev/null +++ b/.github/workflows/issue-check-inactive.yml @@ -0,0 +1,26 @@ +name: Issue Check Inactive + +on: + schedule: + - cron: "0 0 */15 * *" + +permissions: + contents: read + +jobs: + issue-check-inactive: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: check-inactive + uses: actions-cool/issues-helper@v3 + with: + actions: 'check-inactive' + token: ${{ secrets.GITHUB_TOKEN }} + inactive-label: 'inactive' + inactive-day: 3 + body: | + Since the issue was labeled with `invalid`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply. + + 由于该 issue 被标记为不合规工程,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 diff --git a/.github/workflows/issue-close-required.yml b/.github/workflows/issue-close-required.yml new file mode 100644 index 00000000000..e85abca0f96 --- /dev/null +++ b/.github/workflows/issue-close-required.yml @@ -0,0 +1,26 @@ +name: Issue Close Require + +on: + schedule: + - cron: "0 10 * * *" + +permissions: + contents: read + +jobs: + issue-close-require: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: needs repro project + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + token: ${{ secrets.GITHUB_TOKEN }} + labels: 'need-repro-project' + inactive-day: 2 + body: | + Since the issue was labeled with `need-repro-project`, but no response in 2 days. This issue will be closed. If you have any questions, you can comment and reply. + + 由于该 issue 被标记为需要复现工程,却 2 天未收到回应。现关闭 issue,若有任何问题,可评论回复。