docs: multiply commit types in CONTRIBUTING.md

This commit is contained in:
2024-10-15 01:34:07 +00:00
parent 035f10fda0
commit de57b814a7
+59 -10
View File
@@ -48,6 +48,8 @@ This should be one of, in priority order:
- `feature/` submodule, like `note_graph/note_graph_ui`
- meaningful short description or a naming for your scope, separated with dashes (`-`), one or a couple of words
---
## Commit conventions
### Pull requests
@@ -85,18 +87,22 @@ The format is:
* This means that this commit introduces a breaking change.
### `<type>`
Specify one or more types, separated by commas, to reflect the nature of the changes.
* `feat` Commits, that adds a new feature or changes how the old feature works. Should only be user-presented features, changes to logic that does not affect what user of the app sees is `refactor`.
* `fix` Commits, that fix a bug
* `refactor` Commits, that rewrite/restructure your code, however does not change any behaviour
* **Allowed types**:
* `feat` Commits, that adds a new feature or changes how the old feature works. Should only be user-presented features, changes to logic that does not affect what user of the app sees is `refactor`.
* `fix` Commits, that fix a bug
* `refactor` Commits, that rewrite/restructure your code, however does not change any behaviour
* `perf` Commits are special `refactor` commits, that improve performance
* `style` Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
* `test` Commits, that add missing tests or correcting existing tests
* `docs` Commits, that affect documentation only
* `build` Commits, that affect build components like build tool, dependencies, project version, ...
* `ci` Commits, that affect the CI pipeline
* `chore` Miscellaneous commits e.g. modifying `.gitignore`
* `revert` Commits that revert other commits
* `style` Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
* `test` Commits, that add missing tests or correcting existing tests
* `docs` Commits, that affect documentation only
* `build` Commits, that affect build components like build tool, dependencies, project version, ...
* `ci` Commits, that affect the CI pipeline
* `chore` Miscellaneous commits e.g. modifying `.gitignore`
* `revert` Commits that revert other commits
* **Myltiple Types**:
* When a commit involves multiple types, list them separated by commas within `{}` braces.
### `<scope>`
@@ -105,6 +111,11 @@ This should be one of, in priority order:
- `feature/` module name that you're currently working on
- meaningful short description or a naming for your scope, separated with dashes (`-`), one or a couple of words
#### **Examples**:
- (authentication)
- (feature/note_graph,note_graph_ui)
- (api,user-management)
### `<subject>`
* Use the imperative, present tense: "change" not "changed", "add" not "added"
@@ -126,3 +137,41 @@ List of format:
* Mention closed issues
- Example: `Closes: #1`
* Stuff like skip CI for tools like Github Actions
## Examples
### Single Type Commit
```ignore
feat(configuration): add support for environment variables
Allows users to define configuration using environment variables.
Closes: #42
```
### Multiple Types Commit
```ignore
{build,fix}(deployment): fix Dockerfile and update dependencies
- Fixed a typo in the Dockerfile causing build failures.
- Updated dependencies to the latest versions.
Closes: #101
```
### Single Type Commit
```ignore
refactor!(api): change authentication method to OAuth2
Switched from basic authentication to OAuth2 for enhanced security.
BREAKING CHANGE: The authentication method has changed from basic auth to OAuth2. Clients must update their authentication mechanism.
Closes: #202
```
### Single Type Commit
```ignore
{docs,test}(feature/note_graph,note_graph_ui): add tests and update documentation
- Added unit tests for note graph UI components.
- Updated the README with new setup instructions.
Related: #303
```