feat: only add type of change in CHANGELOG when there is changed
parent
16bf3ab92a
commit
b30c90f3e5
|
@ -70,14 +70,20 @@ func (g *MarkdownGenerator) getLines(commits []convention.Commit) []string {
|
|||
}
|
||||
}
|
||||
|
||||
lines = append(lines, g.composeTypeHeader(addedType))
|
||||
lines = append(lines, addedLines...)
|
||||
if len(addedLines) != 0 {
|
||||
lines = append(lines, g.composeTypeHeader(addedType))
|
||||
lines = append(lines, addedLines...)
|
||||
}
|
||||
|
||||
lines = append(lines, g.composeTypeHeader(fixedType))
|
||||
lines = append(lines, fixedLines...)
|
||||
if len(fixedLines) != 0 {
|
||||
lines = append(lines, g.composeTypeHeader(fixedType))
|
||||
lines = append(lines, fixedLines...)
|
||||
}
|
||||
|
||||
lines = append(lines, g.composeTypeHeader(othersType))
|
||||
lines = append(lines, othersLines...)
|
||||
if len(othersLines) != 0 {
|
||||
lines = append(lines, g.composeTypeHeader(othersType))
|
||||
lines = append(lines, othersLines...)
|
||||
}
|
||||
|
||||
return lines
|
||||
}
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
"# CHANGELOG",
|
||||
"## v1.0.0 (1-1-1)",
|
||||
"### Added",
|
||||
"* feat: description",
|
||||
"### Fixed",
|
||||
"### Others"
|
||||
"- feat: description"
|
||||
]
|
|
@ -1,8 +1,6 @@
|
|||
[
|
||||
"# CHANGELOG",
|
||||
"## v1.0.0 (1-1-1)",
|
||||
"### Added",
|
||||
"### Fixed",
|
||||
"* fix: description",
|
||||
"### Others"
|
||||
"- fix: description"
|
||||
]
|
|
@ -1,8 +1,6 @@
|
|||
[
|
||||
"# CHANGELOG",
|
||||
"## v1.0.0 (1-1-1)",
|
||||
"### Added",
|
||||
"### Fixed",
|
||||
"### Others",
|
||||
"* ci: description"
|
||||
"- ci: description"
|
||||
]
|
|
@ -2,10 +2,10 @@
|
|||
"# CHANGELOG",
|
||||
"## v1.0.0 (1-1-1)",
|
||||
"### Added",
|
||||
"* feat: description feat",
|
||||
"- feat: description feat",
|
||||
"### Fixed",
|
||||
"* fix: description fix",
|
||||
"- fix: description fix",
|
||||
"### Others",
|
||||
"* ci: description ci",
|
||||
"* build: description build"
|
||||
"- ci: description ci",
|
||||
"- build: description build"
|
||||
]
|
Loading…
Reference in New Issue