#parser #git #conventional-commit #commit #conventional

git-conventional

A parser library for the Conventional Commit specification

17 releases

new 0.12.3 Mar 23, 2023
0.12.1 Dec 29, 2022
0.12.0 Jul 18, 2022
0.11.2 Jan 18, 2022
0.9.0 May 6, 2020

#101 in Parser implementations

Download history 1816/week @ 2022-12-01 1740/week @ 2022-12-08 2101/week @ 2022-12-15 1294/week @ 2022-12-22 1345/week @ 2022-12-29 2674/week @ 2023-01-05 1660/week @ 2023-01-12 2097/week @ 2023-01-19 1893/week @ 2023-01-26 2090/week @ 2023-02-02 1586/week @ 2023-02-09 2301/week @ 2023-02-16 2642/week @ 2023-02-23 2242/week @ 2023-03-02 2348/week @ 2023-03-09 2054/week @ 2023-03-16

9,715 downloads per month
Used in 14 crates (8 directly)

MIT/Apache

47KB
969 lines

code>conventional::Commit

codecov Documentation License Crates Status

A Rust parser library for the Conventional Commit spec.

Quick Start

  1. Add the crate to your Cargo.toml:

    cargo install cargo-edit
    
    cargo add git_conventional
    
  2. Parse a commit and lookup what you need

    let commit = git_conventional::Commit::parse("feat(conventional commit): this is it!").unwrap();
    
    assert_eq!(commit.type_(), git_conventional::Type::FEAT);
    assert_eq!(commit.scope().unwrap(), "conventional commit");
    assert_eq!(commit.description(), "this is it!");
    assert_eq!(commit.body(), None);
    

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.7–1MB
~20K SLoC