2025-10-18 22:32:39 +08:00
|
|
|
|
queue_rules:
|
|
|
|
|
|
- name: default
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- check-success=CI
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
|
2025-10-19 10:03:35 +08:00
|
|
|
|
# 开发依赖队列 - 只需要 Commit Lint 通过
|
|
|
|
|
|
- name: dev-dependencies
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
|
2025-10-18 22:32:39 +08:00
|
|
|
|
pull_request_rules:
|
2025-10-19 10:03:35 +08:00
|
|
|
|
# 自动合并 Dependabot 开发依赖分组更新(风险低,允许 CI 失败)
|
|
|
|
|
|
- name: 自动合并 Dependabot 开发依赖
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- author=dependabot[bot]
|
|
|
|
|
|
- or:
|
|
|
|
|
|
- title~=(?i)dev.dependencies
|
|
|
|
|
|
- label=dependencies
|
|
|
|
|
|
- body~=(?i)development.dependencies
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
# 排除主要版本更新
|
|
|
|
|
|
- -title~=(?i)major
|
|
|
|
|
|
actions:
|
|
|
|
|
|
review:
|
|
|
|
|
|
type: APPROVE
|
|
|
|
|
|
message: |
|
|
|
|
|
|
🤖 自动批准开发依赖更新
|
|
|
|
|
|
|
|
|
|
|
|
开发依赖更新风险较低,即使测试失败也不影响生产环境。
|
|
|
|
|
|
如有问题会在后续开发中发现并修复。
|
|
|
|
|
|
queue:
|
|
|
|
|
|
name: dev-dependencies
|
|
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- auto-merged
|
|
|
|
|
|
|
|
|
|
|
|
# 自动合并 Dependabot 生产依赖的 patch 更新(必须 CI 通过)
|
|
|
|
|
|
- name: 自动合并 Dependabot 生产依赖 patch 更新
|
2025-10-18 22:32:39 +08:00
|
|
|
|
conditions:
|
|
|
|
|
|
- author=dependabot[bot]
|
2025-10-19 10:03:35 +08:00
|
|
|
|
- or:
|
|
|
|
|
|
- title~=(?i)production.dependencies
|
|
|
|
|
|
- and:
|
|
|
|
|
|
- label=dependencies
|
|
|
|
|
|
- -body~=(?i)development.dependencies
|
|
|
|
|
|
- title~=(?i)patch
|
2025-10-18 22:32:39 +08:00
|
|
|
|
- check-success=CI
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
actions:
|
|
|
|
|
|
review:
|
|
|
|
|
|
type: APPROVE
|
2025-10-19 10:03:35 +08:00
|
|
|
|
message: 🤖 自动批准生产依赖 patch 更新(测试通过)
|
2025-10-18 22:32:39 +08:00
|
|
|
|
queue:
|
|
|
|
|
|
name: default
|
2025-10-19 10:03:35 +08:00
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- auto-merged
|
|
|
|
|
|
|
|
|
|
|
|
# 自动合并 GitHub Actions 更新(风险低)
|
|
|
|
|
|
- name: 自动合并 GitHub Actions 更新
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- author=dependabot[bot]
|
|
|
|
|
|
- label=github-actions
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
actions:
|
|
|
|
|
|
review:
|
|
|
|
|
|
type: APPROVE
|
|
|
|
|
|
message: 🤖 自动批准 GitHub Actions 更新
|
|
|
|
|
|
queue:
|
|
|
|
|
|
name: dev-dependencies
|
|
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- auto-merged
|
|
|
|
|
|
|
|
|
|
|
|
# 标记需要人工审核的重要更新
|
|
|
|
|
|
- name: 标记需要人工审核的生产依赖更新
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- author=dependabot[bot]
|
|
|
|
|
|
- or:
|
|
|
|
|
|
- title~=(?i)production.dependencies
|
|
|
|
|
|
- and:
|
|
|
|
|
|
- label=dependencies
|
|
|
|
|
|
- -body~=(?i)development.dependencies
|
|
|
|
|
|
- or:
|
|
|
|
|
|
- title~=(?i)minor
|
|
|
|
|
|
- title~=(?i)major
|
|
|
|
|
|
- -check-success=CI
|
|
|
|
|
|
actions:
|
|
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- needs-manual-review
|
|
|
|
|
|
comment:
|
|
|
|
|
|
message: |
|
|
|
|
|
|
⚠️ **需要人工审核**
|
|
|
|
|
|
|
|
|
|
|
|
此更新属于以下情况之一,建议人工审核:
|
|
|
|
|
|
- 生产依赖的 minor/major 版本更新
|
|
|
|
|
|
- CI 测试未通过
|
|
|
|
|
|
|
|
|
|
|
|
Please review this update manually.
|
|
|
|
|
|
|
|
|
|
|
|
# 自动关闭超过 30 天未合并的 Dependabot PR(避免堆积)
|
|
|
|
|
|
- name: 关闭过期的 Dependabot PR
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- author=dependabot[bot]
|
|
|
|
|
|
- updated-at<30 days ago
|
|
|
|
|
|
- -merged
|
|
|
|
|
|
- -closed
|
|
|
|
|
|
actions:
|
|
|
|
|
|
close:
|
|
|
|
|
|
message: |
|
|
|
|
|
|
🤖 自动关闭此 PR
|
|
|
|
|
|
|
|
|
|
|
|
此 PR 已超过 30 天未合并。Dependabot 会在下次运行时创建新的更新。
|
|
|
|
|
|
如果需要此更新,请手动更新依赖或等待下次自动更新。
|
|
|
|
|
|
|
|
|
|
|
|
This PR has been open for over 30 days. Dependabot will create a new update in the next run if needed.
|
2025-10-18 22:32:39 +08:00
|
|
|
|
|
|
|
|
|
|
# 自动合并有 'automerge' 标签且测试通过的 PR
|
|
|
|
|
|
- name: 自动合并标记的 PR
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- label=automerge
|
|
|
|
|
|
- check-success=CI
|
|
|
|
|
|
- check-success=Commit Lint
|
|
|
|
|
|
- "#approved-reviews-by>=1"
|
|
|
|
|
|
- "#changes-requested-reviews-by=0"
|
|
|
|
|
|
actions:
|
|
|
|
|
|
queue:
|
|
|
|
|
|
name: default
|
|
|
|
|
|
|
2025-10-18 23:13:14 +08:00
|
|
|
|
# 自动给小 PR 添加标签(根据文件数)
|
2025-10-18 22:32:39 +08:00
|
|
|
|
- name: 标记小 PR 方便快速 Review
|
|
|
|
|
|
conditions:
|
2025-10-18 23:13:14 +08:00
|
|
|
|
- "#files<=3"
|
2025-10-18 22:32:39 +08:00
|
|
|
|
actions:
|
|
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- quick-review
|
|
|
|
|
|
|
2025-10-18 23:13:14 +08:00
|
|
|
|
# 提醒大 PR 需要拆分(根据文件数)
|
2025-10-18 22:32:39 +08:00
|
|
|
|
- name: 提醒大 PR
|
|
|
|
|
|
conditions:
|
2025-10-18 23:13:14 +08:00
|
|
|
|
- "#files>=20"
|
2025-10-18 22:32:39 +08:00
|
|
|
|
actions:
|
|
|
|
|
|
comment:
|
|
|
|
|
|
message: |
|
2025-10-18 23:13:14 +08:00
|
|
|
|
⚠️ 这个 PR 改动了较多文件(20+ 个),建议拆分成多个小 PR,便于 Review 和测试。
|
2025-10-18 22:32:39 +08:00
|
|
|
|
|
2025-10-18 23:13:14 +08:00
|
|
|
|
⚠️ This PR modifies many files (20+). Consider splitting it into smaller PRs for easier review and testing.
|
2025-10-18 22:32:39 +08:00
|
|
|
|
|
|
|
|
|
|
# 自动更新过期的分支
|
|
|
|
|
|
- name: 自动更新过期分支
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- -draft
|
|
|
|
|
|
- -closed
|
|
|
|
|
|
- base=master
|
|
|
|
|
|
- "#approved-reviews-by>=1"
|
|
|
|
|
|
actions:
|
2025-10-18 23:13:14 +08:00
|
|
|
|
update: {}
|
2025-10-18 22:32:39 +08:00
|
|
|
|
|
2025-10-18 23:13:14 +08:00
|
|
|
|
# 自动添加标签
|
|
|
|
|
|
- name: 添加 dependencies 标签
|
2025-10-18 22:32:39 +08:00
|
|
|
|
conditions:
|
2025-10-18 23:13:14 +08:00
|
|
|
|
- author=dependabot[bot]
|
2025-10-18 22:32:39 +08:00
|
|
|
|
actions:
|
2025-10-18 23:13:14 +08:00
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- dependencies
|
2025-10-18 22:32:39 +08:00
|
|
|
|
|
2025-10-18 23:13:14 +08:00
|
|
|
|
# 标记需要关注的 PR
|
|
|
|
|
|
- name: 标记需要更新的 PR
|
|
|
|
|
|
conditions:
|
|
|
|
|
|
- "#commits-behind>10"
|
|
|
|
|
|
actions:
|
|
|
|
|
|
label:
|
|
|
|
|
|
add:
|
|
|
|
|
|
- needs-rebase
|