Skip to content

Commit c69c8a7

Browse files
committed
ci: 添加自动管理过时 Issues 和 PRs 的 GitHub Actions 工作流
- 新增 .github/workflows/Close_Stale_Issues_and_PRs.yaml 文件 - 配置每日定时任务,自动检测和管理过时的 Issues 和 PRs - 设置过时提醒和自动关闭的消息内容 - 定义过时和自动关闭的时间限制 - 添加相应的标签以标记过时和自动关闭的 Issues 和 PRs - 配置免于自动管理的标签
1 parent 0591f54 commit c69c8a7

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "自动管理过时的问题和PR"
2+
on:
3+
schedule:
4+
- cron: "0 18 * * *"
5+
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/stale@v9
15+
with:
16+
stale-issue-message: |
17+
⚠️ 此 Issue 已超过一定时间未活动,如果没有进一步更新,将在 30 天后关闭。
18+
close-issue-message: |
19+
🔒 由于长时间未响应,此 Issue 已被自动关闭。如有需要,请重新打开或提交新 issue。
20+
stale-pr-message: |
21+
⚠️ 此 PR 已超过一定时间未更新,请更新,否则将在 30 天后关闭。
22+
close-pr-message: |
23+
🔒 此 PR 已因无更新而自动关闭。如仍需合并,请重新打开或提交新 PR。
24+
25+
days-before-issue-stale: 60
26+
days-before-pr-stale: 60
27+
days-before-close: 30
28+
29+
stale-issue-label: "未跟进问题(Stale)"
30+
close-issue-label: "自动关闭(Close)"
31+
stale-pr-label: "未跟进问题(Stale)"
32+
close-pr-label: "自动关闭(Close)"
33+
exempt-issue-labels: "新功能(feature),功能异常(bug),文档补充(docs),功能优化(enhancement),适合新手(good first issue),"
34+
exempt-pr-labels: "新功能(feature),功能异常(bug),文档补充(docs),功能优化(enhancement),适合新手(good first issue),"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ __pycache__/
1616
*.spec
1717
*.ini
1818
*.txt
19+
!.github/workflows/*.yaml

0 commit comments

Comments
 (0)