71 lines
1.6 KiB
Markdown
71 lines
1.6 KiB
Markdown
Pull Request 与 Commit 信息规范
|
|
===============================================
|
|
|
|
本文介绍 Pull Request(简称 PR)和 Commit 信息规范,适用于所有 OceanBase 仓库。 所有提交至 OceanBase 仓库的 commit 均必须遵循以下准则。
|
|
|
|
Commit 信息规范
|
|
--------------------------------
|
|
|
|
```bash
|
|
<type>(<scope>): <subject> // scope is optional, subject is must
|
|
|
|
<body> // optional
|
|
|
|
<footer> // optional
|
|
```
|
|
|
|
|
|
|
|
本节参照 [AngularJS commit 规则](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit)。其中,
|
|
|
|
* `<Type>` 描述 Commit 类型。
|
|
|
|
|
|
|
|
* `<subject>` 是简短的 Commit 描述。
|
|
|
|
|
|
|
|
* 如需添加详细信息,请添加空白行,然后以段落的格式进行添加。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Commit 类型**
|
|
|
|
常见的 Commit 类型见下表:
|
|
|
|
|
|
| Commit 类型 | 说明 |
|
|
|-----------|--------------|
|
|
| Feature | 新功能 |
|
|
| Fix | 修复 bug |
|
|
| Doc | 文档 |
|
|
| Style | 代码格式 |
|
|
| Refactor | 重构 |
|
|
| Test | 增加测试 |
|
|
| Chore | 构建过程或辅助工具的变动 |
|
|
|
|
|
|
|
|
PR 信息规范
|
|
----------------------------
|
|
|
|
提交 PR 时,您需要在标题中包含所有更改的详细信息,并确保标题简洁。您可以不为简单更改添加描述。如果 PR 涉及复杂更改,请对更改进行概述。如果 PR 修复了相关 Issue,请将 PR 与之关联。
|
|
|
|
**PR 模板**
|
|
|
|
```bash
|
|
What changes were proposed in this pull request?
|
|
|
|
Why are the changes needed?
|
|
|
|
Does this PR introduce any user-facing change?
|
|
|
|
How was this patch tested?
|
|
```
|
|
|
|
|