Files
openstapps/project-docs/workflow/COMMITS.md
Karl-Philipp Wulfert 7981463255 docs: add worklow docs
2018-12-11 09:53:51 +00:00

60 lines
1.9 KiB
Markdown

# Commit guidelines
## Template
Commit messages should match the following template:
> `TYPE`: `MESSAGE`
>
> `DESCRIPTION`
### `TYPE`
`TYPE` can have one of the following values:
| value | meaning |
| --- | --- |
| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
| docs | Documentation only changes |
| feat | A new feature |
| fix | A bug fix |
| perf | A code change that improves performance |
| refactor | A code change that neither fixes a bug nor adds a feature |
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| test | Adding missing tests or correcting existing tests |
These are the [types](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type), that angular uses. They are easily adaptable for all TypeScript based web related projects.
### `MESSAGE`
`MESSAGE` should complete a sentence that starts with "This commit will...".
The first line of the commit message should not be longer than 50 chars overall.
### `DESCRIPTION`
`DESCRIPTION` can contain a longer description of the commit. Each line should not be longer than 70 chars. New lines can be used to structure the description.
To reference or close [issues](ISSUES.md) GitLab [keywords](https://docs.gitlab.com/ce/user/project/issues/automatic_issue_closing.html) can be used in the last line(s) of the description:
> Fixes #42
or
> References #42
## Advantages
The result of those commit guidelines is a concise and clear history of the development.
Another advantage is the automatic [generation](https://www.npmjs.com/package/conventional-changelog-cli) of a changelog that gives an overview of the changes.
```
conventional-changelog -p angular -i CHANGELOG.md -s -r 0
```
## Further resources
* [Versioning](VERSIONING.md)