governor-core 2.0.3

Core domain and application logic for cargo-governor
Documentation

governor-core

Core domain and port traits for the cargo-governor workspace.

This crate contains the parts that should stay independent from concrete infrastructure:

  • semantic versioning and bump types
  • Conventional Commit parsing
  • changelog and release planning models
  • workspace and dependency graph types
  • traits for source control, registries, checkpoints, and workflows

Usage

use governor_core::{
    BumpType,
    Commit,
    SemanticVersion,
};

let current = SemanticVersion::parse("1.4.2")?;
let next = BumpType::Minor.apply_to(&current);

let commit = Commit::new(
    "abc123".to_string(),
    "feat(api): add release status".to_string(),
    "Author".to_string(),
    "author@example.com".to_string(),
    chrono::Utc::now(),
);

assert_eq!(next.to_string(), "1.5.0");
assert!(commit.commit_type.is_some());

# Ok::<(), Box<dyn std::error::Error>>(())

Scope

Use governor-core when you want the domain model and stable port interfaces. Use governor-application when you want ready-made release and owners use cases.

License

MIT OR Apache-2.0