2022-01-25 14:46:19 +08:00
|
|
|
|
---
|
2022-07-11 14:36:46 +08:00
|
|
|
|
id: 日志(Commit)
|
|
|
|
|
title: 日志(Commit)
|
2022-07-10 18:59:59 +08:00
|
|
|
|
sidebar_position: 2
|
2022-06-16 11:37:04 +08:00
|
|
|
|
data: 2022年6月15日
|
2022-01-25 14:46:19 +08:00
|
|
|
|
---
|
|
|
|
|
|
2022-07-11 14:36:46 +08:00
|
|
|
|
## 规范
|
2022-01-25 14:46:19 +08:00
|
|
|
|
|
2022-07-10 18:35:40 +08:00
|
|
|
|
项目日志所有内容务必使用 **ASCII** 字符,尽量不要使用中文或 emoji,要求**最大化兼容**,便于程序处理。
|
2022-01-25 14:46:19 +08:00
|
|
|
|
|
|
|
|
|
commit 包括三个部分:**Header**、**Body**、**Footer**。
|
|
|
|
|
|
|
|
|
|
commit 格式如下:
|
|
|
|
|
|
2022-05-30 12:27:50 +08:00
|
|
|
|
```text
|
2022-01-25 14:46:19 +08:00
|
|
|
|
<type>([scope]): <subject>
|
|
|
|
|
|
|
|
|
|
[body]
|
|
|
|
|
|
|
|
|
|
[footer]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
示例:
|
|
|
|
|
|
2022-05-30 12:27:50 +08:00
|
|
|
|
```text
|
2022-01-25 14:46:19 +08:00
|
|
|
|
feature(auth): increase length of new API key
|
|
|
|
|
|
|
|
|
|
the length is increased from 24 to 32 for new API keys
|
|
|
|
|
|
|
|
|
|
close #12
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 头部(Header)
|
|
|
|
|
|
|
|
|
|
标题部分只有一行,包括三个字段:类型、说明、标题。
|
|
|
|
|
|
|
|
|
|
![commit-tag.png](https://static.7wate.com/img/2021/08/24/a26a82a44ce2e.png)
|
|
|
|
|
|
|
|
|
|
- 破坏兼容性的改动,影响到依赖本项目的其它系统,请在类型后面加上**半角感叹号**「**!**」。
|
|
|
|
|
- 标题务必不超过 **72** 个字符,务必精炼易懂。如无法限制在 **72** 个字符内,请拆分提交。
|
|
|
|
|
- 描写部分**小写字母开头**、专有名词首字母大写、缩略语大写、结尾不用句号。
|
|
|
|
|
|
|
|
|
|
### 主体(Body)
|
|
|
|
|
|
|
|
|
|
标题与正文间隔一个空行。
|
|
|
|
|
|
|
|
|
|
如果内容简单,请按照标题格式。超过一行,按照常规的段落格式。
|
|
|
|
|
|
|
|
|
|
**首字母大写,正确使用标点。可以多行、多段、每行不超过 72 个字符、行尾不出现空格、段落用空行隔开。**
|
|
|
|
|
|
|
|
|
|
示例
|
|
|
|
|
|
2022-05-30 12:27:50 +08:00
|
|
|
|
```text
|
2022-01-25 14:46:19 +08:00
|
|
|
|
feature!(api): limit array length to 256 elements
|
|
|
|
|
|
|
|
|
|
BREAKING: Array length limit is added to further limit request size. A
|
|
|
|
|
small number of existing apps may receive HTTP 413 "Payload too Large"
|
|
|
|
|
error.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 脚注(Footer)
|
|
|
|
|
|
|
|
|
|
正文与脚注间隔一个空行。
|