conventional_commit_parser 0.7.0

A rust implementation of the conventional commit specification.
Documentation
conventional_commit_parser-0.7.0 has been yanked.

Conventional commit parser

Latest Version Conventional Commits License

A rust implementation of the conventional commit specification.

Example

use conventional_commit_parser::parse;
use conventional_commit_parser::commit::*;
let message = r#"fix: correct minor typos in code

see the issue for details

on typos fixed.

Reviewed-by: Z
Refs #133"#;

let commit = parse(message).unwrap();

assert_eq!(commit.commit_type, CommitType::BugFix);
assert_eq!(commit.summary, "correct minor typos in code".to_string());
assert_eq!(commit.body, Some(r#"see the issue for details

on typos fixed."#));

assert_eq!(commit.footers, vec![
    Footer {token: "Reviewed-by", content: "Z"},
    Footer {token: "Refs", content: "133",}
]);

Licence

All the code in this repository is released under the MIT License, for more information take a look at the LICENSE file.