Skip to content

Repository files navigation

Parser

A go parser for Conventional Commits messages

PkgGoDevGitHub go.mod Go version

Usage

varmsg=`feat(scope): descriptionthis is first line in bodythis is second line in bodyRef #123Date: 01-01-2021By: John Doe`commit, err:=Parse(msg)
iferr!=nil {
fmt.Printf("Error: %s", err.Error())
}
fmt.Printf("%#v", commit)
/*commitMsg = &parser.Commit{ message: "feat(scope): description\n\nthis is first line in body\n\nthis is second line in body\n\nRef #123\nDate: 01-01-2021\nBy: John Doe", header: "feat(scope): description", body: "this is first line in body\n\nthis is second line in body", footer: "Ref #123\nDate: 01-01-2021\nBy: John Doe", commitType: "feat", scope: "scope", description: "description", notes: { {token:"Ref", value:"123"}, {token:"Date", value:"01-01-2021"}, {token:"By", value:"John Doe"}, }, isBreakingChange: false,}*/

TODO

  • More Test Cases
  • Benchmark

Attribution

This parser is inspired and forked from

License

MIT License

About

A go parser for Conventional Commits message

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages