forked from hinterland/documentation
docs: multiply commit types in CONTRIBUTING.md
This commit is contained in:
@@ -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,7 +87,9 @@ 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.
|
||||
|
||||
* **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
|
||||
@@ -97,6 +101,8 @@ The format is:
|
||||
* `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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user