From 41d60cca2c65fdab6dafe4889f29f853eecad170 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 20 Jun 2026 23:38:43 +0800 Subject: [PATCH] =?UTF-8?q?[moz]=20fix:=20M1=20label=20type/feature?= =?UTF-8?q?=E2=86=92type/feat=20=E5=AF=B9=E9=BD=90=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E5=AE=9E=E9=99=85=20label=EF=BC=88=E5=A7=9C=E7=BB=B4=20Review?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - impl.yml: type/feature → type/feat - toolchain_routes.py: business_type feature→feat(匹配 Gitea label) - toolchain-templates.yaml: feature→feat --- .gitea/ISSUE_TEMPLATE/impl.yml | 2 +- config/toolchain-templates.yaml | 2 +- src/api/toolchain_routes.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitea/ISSUE_TEMPLATE/impl.yml b/.gitea/ISSUE_TEMPLATE/impl.yml index f985e10..cfed43c 100644 --- a/.gitea/ISSUE_TEMPLATE/impl.yml +++ b/.gitea/ISSUE_TEMPLATE/impl.yml @@ -2,7 +2,7 @@ name: 实现任务 about: 按设计文档实现功能 title: "[moz] impl: " labels: - - type/feature + - type/feat body: - type: textarea id: description diff --git a/config/toolchain-templates.yaml b/config/toolchain-templates.yaml index 8798382..5bc407d 100644 --- a/config/toolchain-templates.yaml +++ b/config/toolchain-templates.yaml @@ -6,7 +6,7 @@ # issue_assigned(按 Issue label 分 6 路 + infrastructure) # --------------------------------------------------------------------------- issue_assigned: - feature: + feat: steps: - "理解需求(Issue body)→ 如有不明确在 Issue comment 追问" - "git checkout main && git pull origin main" diff --git a/src/api/toolchain_routes.py b/src/api/toolchain_routes.py index 1af4604..f56586b 100644 --- a/src/api/toolchain_routes.py +++ b/src/api/toolchain_routes.py @@ -1026,13 +1026,15 @@ async def _handle_issues(payload: Dict[str, Any]) -> None: ) else: # §21 §5 按 type/* label 解析 business_type - business_type = "feature" # default + business_type = "feat" # default for lbl in labels_list: lbl_lower = lbl.lower() if "bug" in lbl_lower: business_type = "bug" - elif "impl" in lbl_lower or "feature" in lbl_lower: - business_type = "feature" if "feature" in lbl_lower else "impl" + elif "impl" in lbl_lower: + business_type = "impl" + elif "feat" in lbl_lower: + business_type = "feat" elif "docs" in lbl_lower or "documentation" in lbl_lower: business_type = "docs" elif "refactor" in lbl_lower: