Expand description
Commit domain entity
This module provides structures for working with git commits and parsing Conventional Commits format.
§Conventional Commits Format
The basic format is: <type>[optional scope]: <description>
Common types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringperf: Performance improvementstest: Adding testsbuild: Build system changesci: CI configuration changeschore: Maintenance tasks
§Examples
use governor_core::domain::commit::{Commit, CommitType};
let commit = Commit::new(
"abc123def".to_string(),
"feat(api): add user authentication".to_string(),
"Alice".to_string(),
"alice@example.com".to_string(),
chrono::Utc::now(),
);
assert_eq!(commit.commit_type, Some(CommitType::Feat));
assert_eq!(commit.scope, Some("api".to_string()));Structs§
- Commit
- A git commit
- Commit
History - A collection of commits
Enums§
- Commit
Type - Conventional commit types