conventional_commit_parser

Crates.ioconventional_commit_parser
lib.rsconventional_commit_parser
version0.9.4
sourcesrc
created_at2021-09-09 05:47:45.860118
updated_at2022-01-17 13:49:52.327619
descriptionA rust implementation of the conventional commit specification.
homepage
repositoryhttps://github.com/oknozor/conventional_commits_parser_rs
max_upload_size
id448731
size56,190
Paul Delafosse (oknozor)

documentation

https://docs.rs/conventional_commit_parser

README

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 conventional_commit = parse(message)?;

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

on typos fixed."#.to_string()));

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

Licence

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

Commit count: 41

cargo fmt