You've already forked go-semantic-release
refactor(changelog): clean up author map
This commit is contained in:
committed by
Felix Wiedmann
parent
1d0c93b678
commit
fd1063132f
@@ -157,17 +157,11 @@ func (c *Changelog) GenerateChangelog(templateConfig shared.ChangelogTemplateCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
authors := map[string]int{}
|
authors := map[string]bool{}
|
||||||
|
|
||||||
for _, commits := range analyzedCommits {
|
for _, commits := range analyzedCommits {
|
||||||
for _, commit := range commits {
|
for _, commit := range commits {
|
||||||
|
authors[commit.Commit.Author] = true
|
||||||
_, ok := authors[commit.Commit.Author]
|
|
||||||
if !ok {
|
|
||||||
authors[commit.Commit.Author] = 0
|
|
||||||
}
|
|
||||||
authors[commit.Commit.Author] = authors[commit.Commit.Author] + 1
|
|
||||||
|
|
||||||
if commit.Print {
|
if commit.Print {
|
||||||
if commit.IsBreaking {
|
if commit.IsBreaking {
|
||||||
commitsBreakingChange = append(commitsBreakingChange, commit)
|
commitsBreakingChange = append(commitsBreakingChange, commit)
|
||||||
|
|||||||
Reference in New Issue
Block a user