docs: include examples of commit header, itroduce issue id, and specify message body

This commit is contained in:
Anto Keinänen 2023-05-10 17:47:09 +03:00 committed by GitHub
parent e85ca51011
commit 974655f5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,9 +44,9 @@ All commit messages must conform to this format:
<body>
```
## Commit Header
The type field is always required. A summary is optional when bumping the version. Every commit should only contain one type.
The type field is always required. A summary is optional when bumping the version. If the commit is related to issue please refer to it. Every commit should only contain one type.
```
<type>: <short summary>
<type>(<issue-id>): <short summary>
│ │
│ └─⫸ Summary in the present tense. Not capitalized. No period at the end.
@ -54,6 +54,7 @@ The type field is always required. A summary is optional when bumping the versio
└─⫸ Commit Type: build|docs|feat|fix|perf|refactor|test
```
### Type
**Example**: `fix(#123): fix a bug where XYZ`, `bump-version`, `feat(#123): add a feature that XYZ`
Must be one of the following:
- build: Changes that affect the build system or external dependencies
- docs: Documentation only changes
@ -68,6 +69,11 @@ Use the summary field to provide a succinct description of the change:
- don't capitalize the first letter
- no dot (.) at the end
## Message body
- Optional but recommended
- Just as in <subject> use imperative, present tense: “change” not “changed” nor “changes”
# Support
You can support me by buying me a coffee at [buymeacoffee.com](https://www.buymeacoffee.com/antokeinanen)!