Conventional Commits
GAIA follows the Conventional Commits specification to standardize commit messages and enable automated versioning and changelog generation.What are Conventional Commits?
Conventional Commits is a specification for adding human and machine readable meaning to commit messages. It provides an easy set of rules for creating an explicit commit history, which makes it easier to write automated tools on top of.Format
The commit message should be structured as follows:Format Examples
Simple commit:Supported Types
Based on our GitHub workflows, GAIA supports the following conventional commit types:Core Types
- feat: A new feature for the user
- fix: A bug fix for the user
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries
Additional Types
- ci: Changes to our CI configuration files and scripts
- build: Changes that affect the build system or external dependencies
- revert: Reverts a previous commit
- perf: A code change that improves performance
- release: Release commits (handled automatically)
- deps: Dependency updates
- infra: Infrastructure changes
- security: Security-related changes
- env: Environment configuration changes
- i18n: Internationalization changes
- ux: User experience improvements
- config: Configuration changes
- assets: Asset changes (images, fonts, etc.)
- meta: Meta changes (README, documentation structure, etc.)
Examples
Basic Examples
With Scope
Breaking Changes
Pull Request Titles
Our CI enforces that pull request titles also follow the conventional commit format. This ensures consistency across both commits and pull requests.Automated Benefits
Following conventional commits enables:- Automatic versioning: Semantic version bumps based on commit types
- Changelog generation: Automated changelog creation from commit messages
- Release automation: Automated releases through Release Please
- Better project history: Clear, structured commit history
Best Practices
- Use lowercase: Keep type and description in lowercase
- Be descriptive: Write clear, concise descriptions
- Use imperative mood: “add feature” not “added feature”
- Limit line length: Keep the first line under 50 characters when possible
- Include scope when helpful: Use scopes to provide additional context
- Use breaking change notation: Mark breaking changes with
!
orBREAKING CHANGE: