From b570ac24d4abdbf4a53714b855ff3de6b764a481 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Sun, 11 Jan 2026 16:35:59 +0800 Subject: [PATCH] Autoclose issue (#6238) * auto close old issue * auto close issue --- .github/workflows/auto-close-issue.yml | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/auto-close-issue.yml diff --git a/.github/workflows/auto-close-issue.yml b/.github/workflows/auto-close-issue.yml new file mode 100644 index 0000000000..3b68f017ef --- /dev/null +++ b/.github/workflows/auto-close-issue.yml @@ -0,0 +1,39 @@ +name: Auto Close Stale Issues (Ignore PRs & Exclude features) + +on: + schedule: + - cron: '0 4 * * *' # 每天凌晨4点UTC运行,可调整频率 + workflow_dispatch: # 支持手动触发测试 + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Mark and Close Stale Issues (No PR Handling) + uses: actions/stale@v9 + with: + # 6个月≈180天,标记Issue为过时 + days-before-issue-stale: 90 + # 标记后7天无活动,自动关闭Issue(缓冲期,可设为0立即关闭) + days-before-issue-close: 0 + + # Issue相关提示与标签 + # stale-issue-message: > + # This issue has not been updated for more than 6 months and is marked as stale. + # If there is no further activity within 7 days, it will be automatically closed. Please reply to this issue if you need to continue following up on it. + close-issue-message: > + This issue has been automatically closed due to prolonged inactivity (more than 6 months plus a 7-day grace period). + If this issue still needs to be resolved, you can reopen it and supplement the relevant information. + # stale-issue-label: 'stale' + close-issue-label: 'auto-closed' + + # 核心修改:添加features标签到豁免列表,排除该标签的Issue + exempt-issue-labels: 'critical, wontstale, in-progress, feature, good feature, documentation' + exempt-milestones: true + + # 禁用PR所有处理,保持PR状态不变 + days-before-pr-stale: -1 + days-before-pr-close: -1