The preset center now lives in its own repository (dsh-presets) and is consumed here as the published npm package @linxin666/dsh-client-ui-preset-center, the way the skin center, the pet plugin and the community plugin index already are. - packages/dsh-preset-center leaves this tree (plugin sources, tests and the presets/ catalog; history stays in this repository); - the aggregate mounts it through an external rows: entry (web-ui-preset-center) with a hand-written ^0.4.1 range, and ./preset-center stays in the exports map as a tombstone so profiles written against the patchFrom era keep importing; - market-inputs.lock.json gains a presets input pinned to the satellites/dsh-presets gitlink, and scripts/market-build reads .market-inputs/presets with the in-repo fallback kept for the fixture tests; - scripts/sync-shared.mjs stops mirroring five host helpers into the package (101 -> 96 copies); the lib fingerprints, coverage baseline, test-standards baseline, runtime-deps scan and i18n audit each shrink by one package; - the contribution gate has no exception left: reject-non-content-pr.yml redirects a 新预设收录 declaration to dsh-presets, and the PR template, CONTRIBUTING.md, PR_TRIAGE.md and ISSUE_TRIAGE.md now state that this repository accepts no external contribution directly; - docs, the family-satellite owning note and the two preset notes follow, and the new Agent Note records the split. Gated by: typecheck, aggregate:check, libs:check, sync-shared:check, runtime-deps:check, i18n:check, emoji:check, docs:check, market:check, test:standards, test:scripts (340 tests), test (every package) and build. Not yet safe to merge on its own: the satellites/dsh-presets gitlink needs that repository to exist on GitHub, so the satellite commits and this pin have to be pushed together.
4.4 KiB
PR_TRIAGE — PR 分类与审批路由
本文件定义 dsh-web 仓库 PR 的自动分类与分派路由机制:PR 打开后由
.github/workflows/auto-assign-pr-reviewers.yml 按 PR 描述勾选的类别(PR 类别(PR Category))、
变更文件与标题匹配分类,自动把对应协作者设为负责人(assignee)并请求其审查,
与 ISSUE_TRIAGE.md 中 Issue 的自动分派对应。
路由配置
分类与审批者的映射在 .github/pr-review-routes.json:
| 字段 | 说明 |
|---|---|
routes[].name |
分类唯一名,出现在路由日志与评论中 |
routes[].label |
分类的中文展示名 |
routes[].types |
PR 描述「PR 类别(PR Category)」中勾选项的标签列表,勾中任一项即匹配 |
routes[].authors |
PR 作者登录名列表,作者是其中任一用户即匹配(可选维度,用于需要按作者转交的场景) |
routes[].paths |
变更文件 glob 列表(* 不跨目录,** 跨目录),命中任一文件即匹配 |
routes[].title |
标题正则(大小写不敏感),可选 |
routes[].reviewers |
GitHub 用户名列表,命中后请求这些用户审查 |
routes[].assignees |
GitHub 用户名列表,命中后把这些用户设为 PR 负责人(可选) |
匹配规则:authors、types、paths 与 title 任一命中即匹配;多个分类可同时命中,
负责人与审查者各取并集;PR 作者本人会被过滤(避免自审,作者本人命中的路由贡献
空集,由其他命中的路由接管),draft PR 不触发。工作流从 base 分支读取配置
(PR 自身无法修改自己的路由),读取失败时跳过并记录警告。
当前路由
| name | 分类 | 类别勾选 | 负责人 / 审批者 |
|---|---|---|---|
plugins |
插件功能(任务看板 / Git 图谱 / 右侧面板 / 远程 Web UI / SSH / 设置 / 聚合包) | 插件功能 | zhu1090093659 |
maintenance |
维护 / 其他 | 维护 / 其他 | zhu1090093659 |
未命中任何分类的 PR 由 defaultRoute 兜底,交给 zhu1090093659。
皮肤 / 皮肤中心、社区插件索引与预设三类没有路由:这三类内容贡献已迁至独立仓,按这三类提交到本仓的 PR 由 .github/workflows/reject-non-content-pr.yml 关闭并重定向到 dsh-skins / dsh-community-plugins / dsh-presets;勾「新宠物收录」类型的 PR 同样重定向到 dsh-pet。该工作流按模板标签前缀识别勾选项,模板可以在标签后追加说明文字。本仓库不再接受任何外部内容贡献,外部 PR 一律由该工作流关闭并指向对应独立仓或 Issue。
新增分类:在 routes 追加条目并同步本表格;纯按标题路由可只写 title,
例如 {"name": "community", "title": "^社区", "reviewers": ["zhu1090093659"]};
按类别路由可只写 types,值为 PR 描述「PR 类别」勾选项的标签(须与模板一致),例如
{"name": "<分类名>", "types": ["<PR 类别勾选项标签>"], "assignees": ["<用户名>"], "reviewers": ["<用户名>"]};
按作者转交可只写 authors:{"name": "maintainer", "authors": ["Aa728848"], "reviewers": ["zhu1090093659"]}(当前未启用)。
自动化行为
- 触发:
pull_request_target的opened/reopened/synchronize/ready_for_review; - 命中后调用
pulls.requestReviewers请求审查,并调用issues.addAssignees把assignees中的用户设为 PR 负责人; opened时另发布一条分类路由说明评论(负责人与审查者);- 无命中时不设置负责人、不请求审查者,只记录日志。
合并门禁
dev 与 main 分支保护:必需状态检查为 CI checks / plugin-mount /
Validate PR contribution evidence(GitHub Actions,strict 关闭);
必需人工审批为 0 —— 检查全绿后,具有 write 权限的协作者(如 Aa728848)
即可自行合并 PR(含自己提交的 PR),无需等待维护者审批;维护者仍可随时
追加审查。
维护者速查
# 手动请求审查
gh pr edit <n> -R zhu1090093659/dsh-web --add-reviewer Aa728848
# 查看某 PR 的变更文件
gh api repos/zhu1090093659/dsh-web/pulls/<n>/files --jq '.[].filename'