add dev-rules docs

This commit is contained in:
debugtalk
2019-04-24 17:29:37 +08:00
parent 35c071349c
commit 0e4f691e22
3 changed files with 48 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ HttpRunner is rich documented.
## How to Contribute
1. Check for [open issues](https://github.com/HttpRunner/HttpRunner/issues) or [open a fresh issue](https://github.com/HttpRunner/HttpRunner/issues/new/choose) to start a discussion around a feature idea or a bug.
2. Fork [the repository](https://github.com/httprunner/httprunner) on GitHub to start making your changes to the **master** branch (or branch off of it).
2. Fork [the repository](https://github.com/httprunner/httprunner) on GitHub to start making your changes to the **master** branch (or branch off of it). You also need to comply with the [development rules](docs/dev-rules.md).
3. Write a test which shows that the bug was fixed or that the feature works as expected.
4. Send a pull request, you will then become a [contributor](https://github.com/HttpRunner/HttpRunner/graphs/contributors) after it gets merged and published.

47
docs/dev-rules.md Normal file
View File

@@ -0,0 +1,47 @@
## 版本号Version
从 2.0 版本开始HttpRunner 开始使用 [`Semantic Versioning`][SemVer] 版本号机制。该机制由 GitHub 联合创始人 Tom Preston-Werner 编写,当前被广泛采用,遵循该机制也可以更好地与开源生态统一,避免出现 “dependency hell” 的情况。
具体地HttpRunner 将采用 `MAJOR.MINOR.PATCH` 的版本号机制。
- MAJOR: 重大版本升级并出现前后版本不兼容时加 1
- MINOR: 大版本内新增功能并且保持版本内兼容性时加 1
- PATCH: 功能迭代过程中进行问题修复bugfix时加 1
当然在实际迭代开发过程中肯定也不会每次提交commit都对 PATCH 加 1在遵循如上主体原则的前提下也会根据需要在版本号后面添加先行版本号-alpha/beta/rc或版本编译元数据+20190101作为延伸。
## 分支策略
HttpRunner 的开发分支策略采用 GitHub Flow。
![](images/github-flow.png)
## 提交信息Commit Message
代码提交的注释信息遵循如下格式规范:
```xml
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
- **type**【必填】,大致分类如下:
- feat新功能feature
- fix修补 bug
- docs文档documentation
- style 格式(不影响代码运行的变动)
- perf性能提升
- refactor重构即不是新增功能也不是修改 bug 的代码变动)
- test增加测试
- build构建过程或辅助工具的变动
- **subject**【必填】,对提交内容的简要概述
- scope【可选项】用于说明 commit 影响的范围,视项目而定,一般建议写对应具体模块
- body【可选项】对提交内容的详细描述
- footer【可选项】一般为BREAKING CHANGE或关联的issue等内容 详见参考文档
[SemVer]: https://semver.org/

BIN
docs/images/github-flow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB