feat: add RawHeader in conventional commit
parent
3ab8e17719
commit
758c5173c8
|
@ -18,6 +18,7 @@ var (
|
|||
)
|
||||
|
||||
type Commit struct {
|
||||
RawHeader string
|
||||
Type string
|
||||
Scope string
|
||||
Description string
|
||||
|
@ -44,6 +45,8 @@ func parseHeader(header string, commit *Commit) error {
|
|||
return errors.New("wrong header format")
|
||||
}
|
||||
|
||||
commit.RawHeader = header
|
||||
|
||||
headerSubmatches := headerRegex.FindStringSubmatch(header)
|
||||
|
||||
commit.Type = headerSubmatches[1]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"RawHeader": "docs: correct spelling of CHANGELOG",
|
||||
"Type": "docs",
|
||||
"Scope": "",
|
||||
"Description": "correct spelling of CHANGELOG"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"RawHeader": "refactor!: drop support for Node 6",
|
||||
"Type": "refactor",
|
||||
"Scope": "",
|
||||
"Description": "drop support for Node 6"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"RawHeader": "feat(lang): add polish language",
|
||||
"Type": "feat",
|
||||
"Scope": "lang",
|
||||
"Description": "add polish language"
|
||||
|
|
Loading…
Reference in New Issue