|
3 | 3 | We'd love to accept your patches and contributions to this project. There are
|
4 | 4 | just a few small guidelines you need to follow.
|
5 | 5 |
|
| 6 | +## Version control |
| 7 | +### Commit style |
| 8 | +To make sure that all our commits remain consistent through time, the project is set up to validate (on Pull Requests) |
| 9 | +that all commits have to the following format: |
| 10 | + |
| 11 | +```bash |
| 12 | +:gitmoji: type(scope?): subject |
| 13 | +body? |
| 14 | +footer? |
| 15 | +``` |
| 16 | + |
| 17 | +For that we use [commitlint-config-gitmoji](https://www.npmjs.com/package/commitlint-config-gitmoji) |
| 18 | +as our [commitlint](https://www.npmjs.com/package/commitlint), if you are worried you might write a commit |
| 19 | +using a wrong emoji, make sure have the project node dependencies installed (`npm install`), this will enable |
| 20 | +a pre-commit hook that checks for the correct format before each commit. |
| 21 | + |
| 22 | +If desired, you could also bypass this check by adding the `-n` option at the end of your commit, |
| 23 | +this might be convenient if you just want to try some things out. |
| 24 | + |
| 25 | +```shell |
| 26 | +git commit -m "wrong commit" -n |
| 27 | +``` |
| 28 | + |
| 29 | +#### [:gitmoji:](https://gitmoji.dev/) (required) |
| 30 | +Must be a valid emoji code, you could easily find out the correct one by executing |
| 31 | +in your shell: |
| 32 | + |
| 33 | +```shell |
| 34 | +npx gitmoji-cli --search <string> |
| 35 | +``` |
| 36 | + |
| 37 | +where `<string>` could be the word "bug" if you are looking for the bug emoji. |
| 38 | + |
| 39 | +#### type (required) |
| 40 | +**Must** be one of the following |
| 41 | + |
| 42 | +```text |
| 43 | + 'feat' // Introducing new features |
| 44 | + 'fix' // Fixing a bug |
| 45 | + 'refactor' // Refactoring code (Not Introducing features or fix) |
| 46 | + 'docs' // add documents |
| 47 | + 'test' // Adding unit tests or e2e test |
| 48 | + 'perf' // Improving performance |
| 49 | + 'revert' // Reverting changes or commits |
| 50 | + 'style' // Updating the UI and style files |
| 51 | + 'build' // build artifacts |
| 52 | + 'ci' // working about CI build system |
| 53 | + 'wip' // Work in progress |
| 54 | + 'chore'; // Work with configuration or other stuff |
| 55 | +``` |
| 56 | + |
| 57 | +#### scope (optional) |
| 58 | +e.g. Unguard microservices (`like-service`, `membership-service`, etc), `docs`, etc. |
| 59 | + |
| 60 | +#### subject (required) |
| 61 | +**Must** be written following the styles: `Sentence case`, `Start Case` and `PascalCase`. |
| 62 | + |
| 63 | +And use them as you normally would: |
| 64 | +* `Sentence case` for normal sentences |
| 65 | +* `Start Case` for names |
| 66 | +* `PascalCase` for referring to file/class names that have that casing style. |
| 67 | + |
| 68 | +*Note: Acronyms are allowed:* `HTTP`, `SSL`, `DSL`. |
| 69 | + |
6 | 70 | ## Contributor License Agreement
|
7 | 71 |
|
8 | 72 | Contributions to this project must be accompanied by a Contributor License
|
|
0 commit comments