docs: norme merge squash (feature→develop→master)
Propagation depuis develop. Co-authored-by: Julien Martin <julien.martin@ptits-pas.fr>
This commit was merged in pull request #191.
This commit is contained in:
@@ -194,6 +194,9 @@ frontend/lib/
|
||||
|
||||
## Workflow Git
|
||||
|
||||
Norme projet : **squash merge** (voir [24_DECISIONS-PROJET.md](./24_DECISIONS-PROJET.md) §26).
|
||||
Cible habituelle : `feature/*` → `develop` ; puis `develop` → `master` quand le lot est prêt.
|
||||
|
||||
```bash
|
||||
# 1. Créer une branche feature
|
||||
git checkout develop
|
||||
@@ -204,15 +207,22 @@ git checkout -b feature/XX-nom-ticket
|
||||
git add .
|
||||
git commit -m "feat(#XX): Description courte"
|
||||
|
||||
# 3. Pousser et créer PR
|
||||
# 3. Pousser et créer PR vers develop
|
||||
git push -u origin feature/XX-nom-ticket
|
||||
|
||||
# 4. Créer PR vers master via Gitea ou API
|
||||
# 4. Créer PR (base = develop)
|
||||
curl -X POST \
|
||||
-H "Authorization: token giteabu_1796c6aace0e2ef7e4fdb49cdc3bc1bf8ee31fbc" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"title":"feat(#XX): Titre","body":"Description\n\nCloses #XX","head":"feature/XX-nom-ticket","base":"master"}' \
|
||||
-d '{"title":"feat(#XX): Titre","body":"Description\n\nCloses #XX","head":"feature/XX-nom-ticket","base":"develop"}' \
|
||||
"https://git.ptits-pas.fr/api/v1/repos/jmartin/petitspas/pulls"
|
||||
|
||||
# 5. Merger en squash (pas merge commit)
|
||||
curl -X POST \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"Do":"squash","MergeTitleField":"feat(#XX): Titre","MergeMessageField":"Closes #XX"}' \
|
||||
"https://git.ptits-pas.fr/api/v1/repos/jmartin/petitspas/pulls/{index}/merge"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user