From 22d95b444b99f9a5c67365e9c93c82c7901e5c7d Mon Sep 17 00:00:00 2001 From: "magic.chen" Date: Mon, 18 Dec 2023 18:59:53 +0800 Subject: [PATCH] workflow: add Issue close workflow (#948) --- .github/workflows/close-issue.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/close-issue.yml diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml new file mode 100644 index 000000000..99e38b1a1 --- /dev/null +++ b/.github/workflows/close-issue.yml @@ -0,0 +1,22 @@ +name: Close inactive issues +on: + schedule: + - cron: "00 21 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + days-before-issue-stale: 30 + days-before-issue-close: 7 + stale-issue-label: "stale" + stale-issue-message: "This issue has been marked as `stale`, because it has been over 30 days without any activity." + close-issue-message: "This issue bas been closed, because it has been marked as `stale` and there has been no activity for over 7 days." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }}