From a2f82fa1b4213e42edd6ccf4795a8eba677fe262 Mon Sep 17 00:00:00 2001 From: Constrat <56174894+Constrat@users.noreply.github.com> Date: Mon, 22 Jul 2024 19:27:48 +0100 Subject: [PATCH] feat: close inactive issues (#9866) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: zzyyyl --- .github/workflows/stale.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..f71d8276fb --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,33 @@ +name: "Mark stale issues and pull requests" + +on: + schedule: + - cron: "0 0 * * *" # Runs daily at midnight + workflow_dispatch: # Allows manual triggering + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + # Completely disable stalling for PRs + pull-requests: none + contents: none + steps: + - name: Close inactive issues + uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 30 # Number of days of inactivity before marking as stale + days-before-close: 3 # Number of days to wait after marking as stale before closing + stale-issue-label: "stale" + stale-issue-message: | + "This issue has been inactive for a prolonged period and will be closed automatically in 3 days." + "该问题已长时间处于闲置状态,3 天后将自动关闭。" + exempt-issue-labels: "keep-open, MAA Team" + # Completely disable stalling for PRs + days-before-pr-stale: -1 + days-before-pr-close: -1 + + operations-per-run: 80 + debug-only: true