Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔄 分支命名规则改进
问题描述
当前的
pre-commit-check.sh脚本要求分支名必须以数字开头(如123-feature-name),但项目中没有启用 issue 驱动的开发规范,导致这个要求过于严格和不实用。🔧 主要改进
1. 更新分支命名正则表达式
2. 改进提示信息
建议使用 [###-task-description] 格式建议使用 [feature-bugfix-description] 格式3. 保持向后兼容性
📋 新的分支命名规范
✅ 允许的分支名示例
feature-user-authenticationdocs-update-api-guidebug-fix-memory-leakrefactor-component-structurehotfix-security-patch123-feature-name(向后兼容)❌ 不允许的分支名示例
featurename(缺少连字符分隔)feature_name(使用下划线)Feature-Name(包含大写字母)🎯 改进效果
🧪 验证
feature-update-branch-naming-rules通过所有检查123-docs-update-trpc-implementation-guide仍然有效📊 影响范围
scripts/pre-commit-check.sh这个改进让团队可以创建更自然的分支名,同时保持基本的命名规范性。
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]