L’igiene dei commit si riferisce alle pratiche che rendono la storia del repository chiara, tracciabile e affidabile. I commit DEVONO (MUST) essere piccoli, ben descritti e collegati al lavoro che rappresentano.
I commit DEVONO (MUST) essere:
PROJ-123: Add user authentication)Tutti i commit DOVREBBERO (SHOULD) essere firmati per verificare l’autore e l’integrità. I commit firmati:
I messaggi di commit PUÒ (MAY) seguire il formato Conventional Commits:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Esempi:
feat(auth): add OAuth2 login supportfix(api): handle null response from user servicedocs: update deployment instructions| Stato | Criteri |
|---|---|
| 🟢 VERDE | Commit piccoli e ben descritti, firmati, collegati a work item, formato consistente |
| 🟡 AMBRA | Pratiche inconsistenti, alcuni commit mal descritti o troppo grandi |
| 🔴 ROSSO | Commit grandi o non chiari, nessuna firma, nessun collegamento a work item |