Skip to content

Commit 5990de2

Browse files
authored
Merge pull request #4 from vividctrlalt/prcheck2
docs: move type and scope reference to PR guidelines
2 parents db0f59b + 10750ee commit 5990de2

1 file changed

Lines changed: 64 additions & 50 deletions

File tree

CONTRIBUTING.md

Lines changed: 64 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Here are some guidelines to get started quickly and easily:
1717
- [Branch Naming Conventions](#Branch-Naming-Conventions)
1818
- [Pull Request Guidelines](#Pull-Request-Guidelines)
1919
- [PR Title Format](#PR-Title-Format)
20+
- [Type and Scope Reference](#Type-and-Scope-Reference)
2021
- [PR Description](#PR-Description)
2122
- [Special Situations And How To Deal With Them](#Special-Situations-And-How-To-Deal-With-Them)
2223
- [Conduct](#Conduct)
@@ -167,6 +168,66 @@ Template:
167168
The message header is a single line that contains succinct description of the change containing a `commit type`, an optional `scope` and a subject.
168169
169170
`commit type` describes the kind of change that this commit is providing:
171+
* feat (new feature)
172+
* fix (bug fix)
173+
* docs (changes to documentation)
174+
* style (formatting, missing semi colons, etc. no code change)
175+
* refactor (refactoring production code)
176+
* test (adding or refactoring tests. no production code change)
177+
* chore (updating grunt tasks etc. no production code change)
178+
* ci (CI/CD configuration)
179+
* perf (performance improvement)
180+
* build (build system changes)
181+
* revert (reverting a previous commit)
182+
183+
The `scope` can be anything specifying place of the commit change. For example: `framework`, `api`, `tvm`, `db`, `net`. For a full list of scopes, see [Type and Scope Reference](#type-and-scope-reference). You can use `*` if there isn't a more fitting scope.
184+
185+
The subject contains a succinct description of the change:
186+
1. Limit the subject line, which briefly describes the purpose of the commit, to 50 characters.
187+
2. Start with a verb and use first-person present-tense (e.g., use "change" instead of "changed" or "changes").
188+
3. Do not capitalize the first letter.
189+
4. Do not end the subject line with a period.
190+
5. Avoid meaningless commits. It is recommended to use the git rebase command.
191+
192+
Message body uses the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
193+
194+
Here is an example:
195+
```
196+
feat(block): optimize the block-producing logic
197+
198+
1. increase the priority that block producing thread acquires synchronization lock
199+
2. add the interruption exception handling in block-producing thread
200+
201+
Closes #1234
202+
```
203+
If the purpose of this submission is to modify one issue, you need to refer to the issue in the footer, starting with the keyword Closes, such as `Closes #1234`,if multiple bugs have been modified, separate them with commas,such as `Closes #123, #245, #992`.
204+
205+
206+
207+
### Branch Naming Conventions
208+
1. Always name the `master` branch and `develop` branch as "master" and "develop".
209+
2. Name the `release_*` branch using version numbers, which are assigned by the project lead (e.g., Odyssey-v3.1.3, 3.1.3, etc.).
210+
3. Use `hotfix/` as the prefix of the `hotfix` branch, briefly describe the bug in the name, and connect words with underline (e.g., hotfix/typo, hotfix/null_point_exception, etc.).
211+
4. Use `feature/` as the prefix of the `feature` branch, briefly describe the feature in the name, and connect words with underline (e.g., feature/new_resource_model, etc.).
212+
### Pull Request Guidelines
213+
214+
#### PR Title Format
215+
216+
PR titles must follow the conventional commit format and will be checked by CI:
217+
218+
```
219+
type(scope): description
220+
```
221+
222+
| Rule | Requirement |
223+
|------|-------------|
224+
| Format | `type: description` or `type(scope): description` |
225+
| Length | 10 ~ 72 characters |
226+
| Type must be one of | `feat` `fix` `refactor` `docs` `style` `test` `chore` `ci` `perf` `build` `revert` |
227+
228+
#### Type and Scope Reference
229+
230+
**Type Reference**
170231
171232
| Type | Purpose | Example |
172233
|------|---------|---------|
@@ -182,9 +243,7 @@ The message header is a single line that contains succinct description of the ch
182243
| `build` | Build system changes | `build: add aarch64 support for RocksDB` |
183244
| `revert` | Reverting a previous commit | `revert: restore ApiUtilTest.java` |
184245
185-
The `scope` is optional and specifies the place or module of the commit change.
186-
187-
#### Module Scopes
246+
**Module Scopes**
188247
189248
| Scope | Description |
190249
|-------|-------------|
@@ -197,7 +256,7 @@ The `scope` is optional and specifies the place or module of the commit change.
197256
| `plugins` | Node tools (Toolkit, ArchiveManifest, database plugins) |
198257
| `protocol` | Protocol definitions, protobuf messages, gRPC contracts |
199258
200-
#### Functional Domain Scopes
259+
**Functional Domain Scopes**
201260
202261
| Scope | Description | Example |
203262
|-------|-------------|---------|
@@ -219,7 +278,7 @@ The `scope` is optional and specifies the place or module of the commit change.
219278
| `docker` | Docker containerization and deployment | `feat(docker): add ARM64 support` |
220279
| `version` | Version and release management | `chore(version): bump to v4.7.8` |
221280
222-
#### Feature Scopes
281+
**Feature Scopes**
223282
224283
| Scope | Description |
225284
|-------|-------------|
@@ -230,51 +289,6 @@ The `scope` is optional and specifies the place or module of the commit change.
230289
| `lite` | Lite fullnode functionality |
231290
| `toolkit` | Node maintenance tools (Toolkit.jar) |
232291
233-
You can use `*` if there isn't a more fitting scope.
234-
235-
The subject contains a succinct description of the change:
236-
1. Limit the subject line, which briefly describes the purpose of the commit, to 50 characters.
237-
2. Start with a verb and use first-person present-tense (e.g., use "change" instead of "changed" or "changes").
238-
3. Do not capitalize the first letter.
239-
4. Do not end the subject line with a period.
240-
5. Avoid meaningless commits. It is recommended to use the git rebase command.
241-
242-
Message body uses the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
243-
244-
Here is an example:
245-
```
246-
feat(block): optimize the block-producing logic
247-
248-
1. increase the priority that block producing thread acquires synchronization lock
249-
2. add the interruption exception handling in block-producing thread
250-
251-
Closes #1234
252-
```
253-
If the purpose of this submission is to modify one issue, you need to refer to the issue in the footer, starting with the keyword Closes, such as `Closes #1234`,if multiple bugs have been modified, separate them with commas,such as `Closes #123, #245, #992`.
254-
255-
256-
257-
### Branch Naming Conventions
258-
1. Always name the `master` branch and `develop` branch as "master" and "develop".
259-
2. Name the `release_*` branch using version numbers, which are assigned by the project lead (e.g., Odyssey-v3.1.3, 3.1.3, etc.).
260-
3. Use `hotfix/` as the prefix of the `hotfix` branch, briefly describe the bug in the name, and connect words with underline (e.g., hotfix/typo, hotfix/null_point_exception, etc.).
261-
4. Use `feature/` as the prefix of the `feature` branch, briefly describe the feature in the name, and connect words with underline (e.g., feature/new_resource_model, etc.).
262-
### Pull Request Guidelines
263-
264-
#### PR Title Format
265-
266-
PR titles must follow the conventional commit format and will be checked by CI:
267-
268-
```
269-
type(scope): description
270-
```
271-
272-
| Rule | Requirement |
273-
|------|-------------|
274-
| Format | `type: description` or `type(scope): description` |
275-
| Length | 10 ~ 72 characters |
276-
| Type must be one of | `feat` `fix` `refactor` `docs` `style` `test` `chore` `ci` `perf` `build` `revert` |
277-
278292
#### PR Description
279293
280294
- PR description must not be empty, minimum **20 characters**.

0 commit comments

Comments
 (0)