Created
April 16, 2019 09:26
-
-
Save zxhfighter/aaab3c2cc57986b4e4fab1dafc59b9ee to your computer and use it in GitHub Desktop.
git 提交规范保证
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 提交规范 | |
提交规范建议遵循如下格式: | |
``` | |
[package/object/file/feature] action: comment | |
``` | |
第一项就是修改涉及的对象,例如包、文件、功能、模块等。 | |
第二项就是动作,一般包括如下动作: | |
- feat: 新特征,新功能 | |
- fix: 修复BUG | |
- ref: 重构代码 | |
- test: 增加测试 | |
- perf: 性能优化 | |
- misc: 其它 | |
- style: 修改样式 | |
第三项就是具体的评论。 | |
看个例子: | |
```markdown | |
## 4.6.3 | |
- [utils] fix: Normalize value before recursively walking down the tree | |
- [browser] ref: Check whether client is enabled for reportDialog and log instead of throw | |
## 4.6.2 | |
- [utils] fix: Preserve function prototype when filling | |
- [utils] fix: use a static object as fallback of the global object | |
- [node] feat: Read from `SENTRY_RELEASE` and `SENTRY_ENVIRONMENT` if present | |
``` | |
可以使用 commitlint 和 husky 来保证提交规范。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment