Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
docs(Server): Database connexion
Browse files Browse the repository at this point in the history
Add doc for naming convention
Change shop database credentials for convention

Linked #39
  • Loading branch information
MansourWolou authored and MelvinCou committed Dec 18, 2023
1 parent 21c324d commit dbdc0eb
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 32 deletions.
90 changes: 62 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,89 @@
# How to become a contributor
Sources :
- https://www.codeheroes.fr/2020/06/29/git-comment-nommer-ses-branches-et-ses-commits/
- https://grafikart.fr/tutoriels/nommage-commit-1009

✔️ You agree to the [Contributor License Agreements](https://www.contributor-covenant.org)

✔️ Make sure your code adheres to the existing style, technologies, and coding standards recommended for the respective language/framework.

### **Did you find a bug? / Do you want to suggest something?**

- Ensure the bug was not already reported by searching on [Issues](https://github.com/EpitechMscProPromo2025/T-POO-700-NAN_3/issues).
Otherwise, create a new one. Be sure to include a **clear title and description**, as much relevant information as possible, and a **sample code** or **executable test case** demonstrating the expected behavior that does not occur.

- Use issue creation templates

### **Do you want to create a branch?**
## **Créer une branche ?**

`<type>/<issue_ID>-<name>`
- Your branch name should be formatted as `fix/<ISSUENUMBER>-<TITLE>` for bug fixes or `feature/<ISSUENUMBER>-<TITLE>` for features.
Example:
`fix/4221-infinite-loop`
`feature/4222-aws-deployement`
`doc/4223-RGPD-compliance`

### **Do you want to fix an issue?**
**Les types de branche :**

- feature: Ajout d’une nouvelle fonctionnalité;

- bugfix: Correction d’un bug;

- hotfix: Correction d’un bug critique;

- chore: Nettoyage du code;

- experiment: Expérimentation de fonctionnalités.

**Le nom de la branche** décrit succinctement le but de celle-ci. Certaines règles doivent être respectées :\

- Create a new branch following the above convention
- Implement your features of fixes in it.
- Le nom doit faire moins de 50 caractères;
- Le nom doit respecter la convention kebab-case (les mots doivent être en minuscule et liés par des tirets “-“);

### **How to title commits?**
Le reste fait référence au **numéro du ticket** (issue)

- Commit often!
**Quelques exemples** \

- Follow [the guidelines](https://cbea.ms/git-commit/)
`feature/27-add-users-controller`

- Use imperative tense (avoid past tense).
`hotfix/621-profile-page-error/`

- The title of the commit must be a summary of the content and not be too long (less than 50 characters).
`experiment/63-try-api-key`

- Prefer putting detailed information inside the commit's description.
`chore/924-remove-deprecated-method`

- Put special keywords at the last line of your message (`Linked`, `Closes`, ...) to link it to an issue or a pull request.
See the [GitHub documentation](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) for more information.
## **Nommer ses commits?**

Example:
**Le format**

<type>(<portée>): <sujet>

<description>

<footer>

**Les types :**

- build: Système de build (example : gulp, webpack, npm)
- ci: Intégration continue (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation
- feat: Ajout d'une fonctionnalité
- fix: Correction de bogue
- perf: Amélioration des performances
- refactor: Changement du code qui ne change rien au fonctionnement
- style: Changement du style du code (sans changer la logique)
- test: Modification des tests

**Portée** définit quelle partie de votre librairie / application est affectée par le commit (cette information est optionnelle)

**Sujet** contient une description succinte des changements,

En utilisant l'impératif présent ("change", et non pas "changed" ou "changes")
Sans majuscule au début\
Pas de "." à la fin de la description

**Description** permet de détailler plus en profondeur les motivations derrière le changement.\
Les règles sont les mêmes que pour la partie Sujet.

**Exemple** :
```sh
git commit -m 'Infinite loop when pressing Alt-F4
git commit -m 'fetaure(Sercer):Infinite loop when pressing Alt-F4
This was caused by a missing check in the event loop
The program now checks when the window is set to close
Linked #101'
```


### **How to submit a pull request?**

- Format your code
Expand All @@ -58,7 +92,7 @@

- Once validated, merge to PR to `main` and remove the source branch with `git branch -D <branch_name>`.

### **How to update your feature branch?**
### **How to update your branch?**

Use the following commands to update your feature branch with the latest changes from `main`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class ApiGatewayApplicationTests {
class sysApiGatewayApplicationTests {

@Test
void contextLoads() {
Expand Down
7 changes: 4 additions & 3 deletions Server/shop/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# WOARNING!!! Currently this launching shop will create tables in bank database
# postgresql database url for unit tests
spring.datasource.url=jdbc:postgresql://localhost:5432/admin
spring.datasource.url=jdbc:postgresql://localhost:5432/shop_db
# postgresql database username
spring.datasource.username=admin
spring.datasource.username=shop_user
# postgresql database password
spring.datasource.password=admin
spring.datasource.password=shop_password
#Configuration for the eureka-server
#spring.application.name=SHOP-SERVICE
#eureka.client.service-url.defaultZone=http://localhost:8761/eureka/

0 comments on commit dbdc0eb

Please sign in to comment.