Skip to content

chore(github): 落地 repo-template 的 issue 表单、PR 模板与标签流程 - #9

Merged
ZouZhao321 merged 2 commits into
mainfrom
chore/repo-template
Oct 9, 2026
Merged

ZouZhao321 merged 2 commits into
mainfrom
chore/repo-template

Conversation

@ZouZhao321

Copy link
Copy Markdown
Owner

关联

Closes #(无对应 issue,来自 repo-template 的配置落地)

做了什么

把 ZouZhao321/repo-template 的协作设施整套带到 mpget:issue 表单、PR 模板、标签自动化与标签词表文档。路径规则按 mpget 的真实目录改过;标签已用 gh label clone 同步到仓库(26 个)。

新增文件:

  • .github/ISSUE_TEMPLATE/:bug.yml、feature.yml、refactor.yml、task.yml、epic.yml、config.yml(关闭空白 issue)
  • .github/pull_request_template.md
  • .github/labeler.yml:路径换成 mpget 的目录,.github/**、scripts/**、package.json、pnpm-lock.yaml、tsconfig.json、vitest.config.ts、eslint.config.mjs、.prettierrc 等归 kind/chore
  • .github/workflows/pr-labeler.yml:PR 打开时按路径打 kind/docs / kind/chore / needs-triage
  • .github/workflows/triage.yml:新 issue 补 needs-triage;每天 01:00 UTC 同步 needs-kind / needs-priority
  • .github/workflows/stale.yml:issue 60+7 天、PR 14+7 天
  • scripts/sync-missing-labels.sh
  • docs/agents/triage-labels.md:标签词表与组合规则

验收

  • 命令:python .tmp/validate-yaml.py .worktrees/repo-template,结果:YAML 全部通过(逐份解析全部 YAML,并校验表单字段类型、name 长度 > 3、workflow 的三段结构)
  • 命令:GH_REPO=ZouZhao321/mpget bash scripts/sync-missing-labels.sh --dry-run,结果:对开启 issue 输出 gh issue edit <n> --add-label needs-kind / --add-label needs-priority
  • 命令:GH_REPO=ZouZhao321/mpget bash scripts/sync-missing-labels.sh,结果:真实补标签成功;补上 kind/chore 与 priority/backlog 后重跑,两个标志标签被摘掉(临时 issue 已关闭)
  • 命令:gh label clone ZouZhao321/repo-template -R ZouZhao321/mpget --force,结果:标签总数 26
  • 命令:gh api repos/actions/labeler/tags、gh api repos/actions/stale/tags,结果:v7 与 v11 均存在

影响面与回滚

只新增文件,不改动 src/、tests/ 与既有 ci.yml。.gitignore 已单独在 main 上提交(忽略 .worktrees/)。

回滚:git revert 本提交并删除标签即可;标签保留不影响构建。

pr-labeler 与 triage 生效要等本 PR 合入默认分支:pull_request_target 读取的是默认分支上的 workflow 文件,所以本 PR 自身不会被自动打标签。

检查清单

  • 一个 PR 只对应一个逻辑变更,提交信息形如 type(scope): 中文描述
  • 本地跑了完整测试,不只跑改动的那一条(本 PR 不涉及测试代码,CI 仍会跑 format:check / lint / build / test)
  • 涉及对外接口或结构的改动已同步到 docs/(新增 docs/agents/triage-labels.md)

@ZouZhao321
ZouZhao321 force-pushed the chore/repo-template branch from d6acb8c to 1d2fff1 Compare October 9, 2026 06:58
@ZouZhao321
ZouZhao321 merged commit 6616b1e into main Oct 9, 2026
1 check passed
@ZouZhao321
ZouZhao321 deleted the chore/repo-template branch October 9, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant