Skip to content
Snippets Groups Projects
Commit 6ae92a98 authored by Martin Juhás's avatar Martin Juhás
Browse files

docs: update docs about commit message format

No API changes

Closes #250
parent 7bc3e64a
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,15 @@ It is the responsibility of the developer to keep these tools up-to-date, ...@@ -5,6 +5,15 @@ It is the responsibility of the developer to keep these tools up-to-date,
however the updating process should be kept simple. however the updating process should be kept simple.
## Sections
- [Docker containers](#docker-containers)
- [Commit messages](#commit-messages)
- [Git hooks](#git-hooks)
- [Backend versioning](#backend-versioning)
- [Definition versioning](#definition-versioning)
- [Adding tests](#adding-tests)
## Docker containers ## Docker containers
The backend uses a [PostgresSQL 16 database](https://www.postgresql.org/docs/16/index.html). The backend uses a [PostgresSQL 16 database](https://www.postgresql.org/docs/16/index.html).
To simplify development, there is a number of different docker compose scripts in the `build` directory: To simplify development, there is a number of different docker compose scripts in the `build` directory:
...@@ -41,6 +50,53 @@ To seed the database with some initial data, use the provided [seed-db.sh](seed- ...@@ -41,6 +50,53 @@ To seed the database with some initial data, use the provided [seed-db.sh](seed-
The script is meant to be run in an environment where python is directly accessible, The script is meant to be run in an environment where python is directly accessible,
e.g. an image built from the `build/Dockerfile`, or after running `poetry shell`. e.g. an image built from the `build/Dockerfile`, or after running `poetry shell`.
## Commit messages
In order to make life easier for the frontend team,
we provide a semi-detailed description of all API changes that happen for each merge request.
To make life easier for us,
we write these commit messages into the `Commit message` section of the merge request.
This makes it easy for the code reviewer to check the message.
### Message format
If the merge request contains no graphql api changes:
```
<feat/change/fix/dev/docs>: <simple description of the changes>
No API changes
Closes #<issue number>
```
If the merge request contains graphql api changes:
```
<feat/change/fix/dev/docs>: <simple description of the changes>
### Additions
- mention names of new types and fields/queries/mutations/subscriptions
### Changes
- mention names of types and fields/queries/mutations/subscriptions that changed
- also include renaming in this section
### Deletions
- mention names of deleted types and fields/queries/mutations/subscriptions
Closes #<issue number>
```
In this case, only include sections which are relevant,
e.g. only include the `Additions` section if the changes add something to the api.
When the merge request is ready to be merged, the commit message **has to be copied** into the
`edit message` box **before merging**.
REST api changes are contained in the [openapi.yml](../openapi.yml) file.
### Viewing changes
To view these changes you can simply use this command on the `main` branch of the repository:
```shell
git log --invert-grep --grep="^Merge branch"
```
## Git hooks ## Git hooks
[Git hook documentation](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) [Git hook documentation](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment