conventional-commits
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseConventional Commits
约定式提交(Conventional Commits)
This project follows the Conventional Commits specification for commit messages.
本项目遵循 Conventional Commits 规范编写提交信息。
Commit Format
提交格式
type(scope): description
[optional body]
[optional footer]type(scope): description
[optional body]
[optional footer]Commit Types
提交类型
Use one of these types:
- - A new feature
feat - - A bug fix
fix - - Documentation only changes
docs - - Maintenance tasks, dependency updates, config changes
chore - - Code restructuring without changing behavior
refactor - - Adding or updating tests
test - - Formatting, whitespace, missing semicolons (no code change)
style - - Performance improvements
perf - - CI/CD configuration changes
ci - - Build system or external dependencies changes
build
请使用以下类型之一:
- - 新增功能
feat - - 漏洞修复
fix - - 仅文档变更
docs - - 维护任务、依赖更新、配置变更
chore - - 不改变代码行为的重构
refactor - - 新增或更新测试
test - - 格式调整、空格处理、补全缺失分号(无代码逻辑变更)
style - - 性能优化
perf - - CI/CD 配置变更
ci - - 构建系统或外部依赖变更
build
Scope
作用域
Scope is optional but recommended for monorepo projects. Use workspace/app names:
- - CMS/Payload changes
cms - - Clients app changes
clients - - Lawyers app changes
lawyers - - Website app changes
website - - Shared package changes
packages
Examples:
feat(cms): add new collectionfix(clients): resolve form validation issuedocs(website): update API documentation
作用域为可选项,但在 monorepo 项目中推荐使用。可使用工作区/应用名称:
- - CMS/Payload 相关变更
cms - - 客户端应用相关变更
clients - - 律师端应用相关变更
lawyers - - 官网应用相关变更
website - - 共享包相关变更
packages
示例:
feat(cms): add new collectionfix(clients): resolve form validation issuedocs(website): update API documentation
Description
描述要求
- Use imperative mood ("add" not "added" or "adds")
- Lowercase first letter (unless starting with proper noun)
- No period at the end
- Keep it concise (50-72 characters recommended)
- 使用祈使语气(用 "add" 而非 "added" 或 "adds")
- 首字母小写(以专有名词开头的情况除外)
- 末尾不加句号
- 保持简洁(推荐长度为 50-72 个字符)
Examples
示例
Good:
feat: introduce editors field for enhanced content management
docs: add AI Elements skill for manual component installation
fix: add CollectionCards to import map for UI components
refactor: simplify AI chat components and enhance conversation handling
chore: update dependencies and configurations for CMS packages
feat(cms): add new blog post collection
fix(clients): resolve authentication token expirationBad:
Added new feature
fix bug
Update README.md
feat: Added new feature for users
fix(clients): Fixed the bug that was causing issues正确示例:
feat: introduce editors field for enhanced content management
docs: add AI Elements skill for manual component installation
fix: add CollectionCards to import map for UI components
refactor: simplify AI chat components and enhance conversation handling
chore: update dependencies and configurations for CMS packages
feat(cms): add new blog post collection
fix(clients): resolve authentication token expiration错误示例:
Added new feature
fix bug
Update README.md
feat: Added new feature for users
fix(clients): Fixed the bug that was causing issuesWhen to Use Each Type
各类型使用场景
feat - New functionality that users will notice
fix - Bug fixes that resolve incorrect behavior
docs - README, comments, documentation files
chore - Package.json updates, lock files, config tweaks
refactor - Restructuring code without changing what it does
test - Test files only
style - Code style changes (formatting, whitespace)
perf - Performance optimizations
ci - GitHub Actions, CI config files
build - Build tools, bundlers, transpilers
feat - 用户可感知的新增功能
fix - 修复错误行为的漏洞补丁
docs - README、代码注释、文档文件相关变更
chore - Package.json 更新、锁文件变更、配置调整
refactor - 不改变代码原有功能的结构调整
test - 仅测试文件相关变更
style - 代码风格变更(格式化、空格调整等)
perf - 性能优化
ci - GitHub Actions、CI 配置文件相关变更
build - 构建工具、打包器、转译器相关变更
Multi-line Commits
多行提交
For complex changes, use body:
feat(cms): add draft/publish workflow
- Add draft status field to collections
- Implement publish endpoint
- Add validation for draft content针对复杂变更,可添加正文:
feat(cms): add draft/publish workflow
- Add draft status field to collections
- Implement publish endpoint
- Add validation for draft content