diff --git a/.github/ISSUE_TEMPLATE/bug_report_zh.md b/.github/ISSUE_TEMPLATE/bug_report_zh.md index 3f61482..d11a49c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_zh.md +++ b/.github/ISSUE_TEMPLATE/bug_report_zh.md @@ -1,7 +1,7 @@ --- name: Bug反馈 about: 反馈Bug -title: "[BUG]" +title: "fix: " labels: bug assignees: zhangzhw8 diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index 2bda701..55939e0 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -1,7 +1,7 @@ --- name: 需求、优化、建议 about: 需求、优化、建议 -title: "[FEATURE]" +title: "feat: " labels: feature assignees: zhangzhw8 diff --git a/.github/configuration.json b/.github/configuration.json index f9866db..94f4b38 100644 --- a/.github/configuration.json +++ b/.github/configuration.json @@ -6,15 +6,15 @@ }, { "title": "### 🚀 Features", - "labels": ["kind/feature", "feature", "feat(front)"] + "labels": ["kind/feature", "feature", "feat(front)", "feat"] }, { "title": "### ✨ Optimizations", - "labels": ["kind/optimization", "optimization", "perf(front)", "optimize(front)", "style(front)"] + "labels": ["kind/optimization", "optimization", "perf(front)", "optimize(front)", "style(front)", "style", "perf"] }, { "title": "### 🐛 Bugfixes", - "labels": ["kind/bugfix", "bugfix", "fix(front)"] + "labels": ["kind/bugfix", "bugfix", "fix(front)", "fix"] }, { "title": "### ✏️ Docs", @@ -26,7 +26,7 @@ }, { "title": "## 📦 Dependencies", - "labels": ["build(front)"] + "labels": ["build(front)", "chore"] } ], "sort": "ASC", @@ -35,11 +35,11 @@ "empty_template": "- no changes", "label_extractor": [ { - "pattern": "^(feature|docs|bugfix|optimization|refactor|test):(.*)", + "pattern": "^(feature|docs|bugfix|optimization|refactor|test|feat|fix|style|chore):(.*)", "target": "$1" }, { - "pattern": "^(refactor|feat|perf|optimize|fix|docs|test|build|style)\\(front\\):(.*)", + "pattern": "^(refactor|feat|perf|optimize|fix|docs|test|build|style|chore)\\(front\\):(.*)", "target": "$1(front)" } ], diff --git a/scripts/workflows/pre-commit/check_commit_message.py b/scripts/workflows/pre-commit/check_commit_message.py index a13a183..d25567f 100644 --- a/scripts/workflows/pre-commit/check_commit_message.py +++ b/scripts/workflows/pre-commit/check_commit_message.py @@ -14,15 +14,14 @@ 校验提交信息是否包含规范的前缀 """ ALLOWED_COMMIT_MSG_PREFIX = [ - ("feature", "新特性"), - ("bugfix", "线上功能bug"), - ("minor", "不重要的修改(换行,拼写错误等)"), - ("optimization", "功能优化"), - ("sprintfix", "未上线代码修改 (功能模块未上线部分bug)"), - ("refactor", "功能重构"), - ("test", "增加测试代码"), - ("docs", "编写文档"), - ("merge", "分支合并及冲突解决"), + ("feat", "新功能/特性"), + ("fix", "Bug修复"), + ("docs", "仅文档更改"), + ("style", "不影响代码含义的更改(空格、格式、缺少分号等)"), + ("refactor", "既不修复错误也不添加功能的代码更改"), + ("perf", "提高性能的代码更改"), + ("test", "添加缺失的测试或更正现有测试"), + ("chore", "对构建过程或辅助工具和库(如文档生成)的更改"), ] @@ -44,7 +43,7 @@ def get_commit_message(): def main(): content = get_commit_message() for prefix in ALLOWED_COMMIT_MSG_PREFIX: - if content.startswith(prefix[0]): + if content.startswith(f"{prefix[0]}:"): return 0 else: