Skip to content

Commit 7d33883

Browse files
committed
docs: add instructions to enable enforce-semantic-commit-message git hook
1 parent 9a951ae commit 7d33883

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ automatically [pip](https://pip.pypa.io/en/stable/) as well.
4646
4747
4848
Remember to do it with Python 3.
49-
49+
50+
- Run `pre-commit install`. For more details, check out Development > Git hooks.
51+
5052
### How to use it
5153
- Set the env var `FLASK_APP` to `time_tracker_api` and start the app:
5254
@@ -74,6 +76,16 @@ DateTime strings in Azure Cosmos DB is `YYYY-MM-DDThh:mm:ss.fffffffZ` which foll
7476
7577
## Development
7678
79+
### Git hooks
80+
We use [pre-commit](https://github.com/pre-commit/pre-commit) library to manage local git hooks, as developers we just need to run in our virtual environment:
81+
82+
```
83+
pre-commit install
84+
```
85+
With this command the library will take configuration from `.pre-commit-config.yaml` and will set up the hooks by us.
86+
87+
Currently, we only have a hook to enforce semantic commit message.
88+
7789
### Test
7890
We are using [Pytest](https://docs.pytest.org/en/latest/index.html) for tests. The tests are located in the package
7991
`tests` and use the [conventions for python test discovery](https://docs.pytest.org/en/latest/goodpractices.html#test-discovery).

0 commit comments

Comments
 (0)