|
20 | 20 | - 如果生效,这个提交(commit)“fix bug"
|
21 | 21 | - 如果生效,这个提交(commit)"user group"
|
22 | 22 |
|
| 23 | +#### 标题行的基本规范 |
| 24 | +```html |
| 25 | +<type>(<scope>): <subject> |
| 26 | +<BLANK LINE> |
| 27 | +<body> |
| 28 | +<BLANK LINE> |
| 29 | +<footer> |
| 30 | +``` |
| 31 | + |
| 32 | +对格式的说明如下: |
| 33 | + |
| 34 | +type代表某次提交的类型,比如是修复一个bug还是增加一个新的feature。所有的type类型如下: |
| 35 | +- feature: 新增feature |
| 36 | +- fix: 修复bug |
| 37 | +- docs: 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等 |
| 38 | +- style: 仅仅修改了空格、格式缩进、都好等等,不改变代码逻辑 |
| 39 | +- refactor: 代码重构,没有加新功能或者修复bug |
| 40 | +- performance: 优化相关,比如提升性能、体验 |
| 41 | +- test: 测试用例,包括单元测试、集成测试等 |
| 42 | +- chore: 改变构建流程、或者增加依赖库、工具等 |
| 43 | +- revert: 回滚到上一个版本 |
| 44 | + |
23 | 45 | 建议标题的尽可能用英文,可以参考如下类别:
|
24 | 46 |
|
25 |
| -- Add = Create a capability e.g. feature, test, dependency. |
26 |
| -- Cut = Remove a capability e.g. feature, test, dependency. |
27 |
| -- Fix = Fix an issue e.g. bug, typo, accident, misstatement. |
28 |
| -- Bump = Increase the version of something e.g. dependency. |
29 |
| -- Make = Change the build process, or tooling, or infra. |
30 |
| -- Start = Begin doing something; e.g. create a feature flag. |
31 |
| -- Stop = End doing something; e.g. remove a feature flag. |
32 |
| -- Refactor = A code change that MUST be just a refactoring. |
33 |
| -- Reformat = Refactor of formatting, e.g. omit whitespace. |
34 |
| -- Optimize = Refactor of performance, e.g. speed up code. |
35 |
| -- Document = Refactor of documentation, e.g. help files. |
| 47 | +- feature: Create a capability e.g. feature, test, dependency. |
| 48 | +- fix: Fix an issue e.g. bug, typo, accident, misstatement. |
| 49 | +- chore: Change the build process, or tooling, or infra. |
| 50 | +- refactor: A code change that MUST be just a refactoring. |
| 51 | +- style: Refactor of formatting, e.g. omit whitespace. |
| 52 | +- performance: Refactor of performance, e.g. speed up code. |
| 53 | +- docs: Refactor of documentation, e.g. help files. |
| 54 | + |
| 55 | +示例:`feat(addition): big integer addition function` |
36 | 56 |
|
37 | 57 | ### 主体
|
38 | 58 |
|
|
0 commit comments