From 69490e526a9cbc4a3163d1419d5521f979564145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8?= Date: Sat, 26 Apr 2025 20:20:05 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=BF=87=E6=97=B6=20Issues=20=E5=92=8C=20PRs?= =?UTF-8?q?=20=E7=9A=84=20GitHub=20Actions=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 .github/workflows/Close_Stale_Issues_and_PRs.yaml 文件 - 配置每日定时任务,自动检测和管理过时的 Issues 和 PRs - 设置过时提醒和自动关闭的消息内容 - 定义过时和自动关闭的时间限制 - 添加相应的标签以标记过时和自动关闭的 Issues 和 PRs - 配置免于自动管理的标签 --- .../workflows/Close_Stale_Issues_and_PRs.yaml | 34 +++++++++++++++++++ .gitignore | 1 + 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/Close_Stale_Issues_and_PRs.yaml diff --git a/.github/workflows/Close_Stale_Issues_and_PRs.yaml b/.github/workflows/Close_Stale_Issues_and_PRs.yaml new file mode 100644 index 0000000..4a2818d --- /dev/null +++ b/.github/workflows/Close_Stale_Issues_and_PRs.yaml @@ -0,0 +1,34 @@ +name: "自动管理过时的问题和PR" +on: + schedule: + - cron: "0 18 * * *" + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: | + ⚠️ 此 Issue 已超过一定时间未活动,如果没有进一步更新,将在 30 天后关闭。 + close-issue-message: | + 🔒 由于长时间未响应,此 Issue 已被自动关闭。如有需要,请重新打开或提交新 issue。 + stale-pr-message: | + ⚠️ 此 PR 已超过一定时间未更新,请更新,否则将在 30 天后关闭。 + close-pr-message: | + 🔒 此 PR 已因无更新而自动关闭。如仍需合并,请重新打开或提交新 PR。 + + days-before-issue-stale: 60 + days-before-pr-stale: 60 + days-before-close: 30 + + stale-issue-label: "未跟进问题(Stale)" + close-issue-label: "自动关闭(Close)" + stale-pr-label: "未跟进问题(Stale)" + close-pr-label: "自动关闭(Close)" + exempt-issue-labels: "新功能(feature),功能异常(bug),文档补充(docs),功能优化(enhancement),适合新手(good first issue)," + exempt-pr-labels: "新功能(feature),功能异常(bug),文档补充(docs),功能优化(enhancement),适合新手(good first issue)," diff --git a/.gitignore b/.gitignore index c02b6fa..1a87dae 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ __pycache__/ *.json /.idea/ /Temp/ +!.github/workflows/*.yaml