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