Aller au contenu

Workflow Git

Conventions Git pour JARVIS.

Branches

main                    # Production stable
├── develop             # Intégration
│   ├── feature/sprint-XX-description
│   ├── bugfix/issue-number
│   └── hotfix/description
└── release/vX.Y.Z

Workflow Feature

# 1. Créer branche
git checkout develop
git pull origin develop
git checkout -b feature/sprint-15-user-preferences

# 2. Développer
git commit -m "feat(users): ajout préférences"

# 3. Push
git push -u origin feature/sprint-15-user-preferences

# 4. Créer PR vers develop
gh pr create --base develop

# 5. Après merge
git checkout develop
git pull origin develop
git branch -d feature/sprint-15-user-preferences

Commits

Format: type(scope): description en français

# Types
feat     # Nouvelle fonctionnalité
fix      # Correction bug
docs     # Documentation
test     # Tests
refactor # Refactoring
chore    # Maintenance

# Exemples
feat(auth): ajout réinitialisation mot de passe
fix(chat): correction streaming
test(documents): ajout tests upload PDF

Pre-Commit Checklist

# 1. Tests passent
pytest tests/ -v -x

# 2. Formatage correct
black app/ --check
isort app/ --check-only

# 3. Linting clean
flake8 app/

# 4. Types corrects
mypy app/