test(analyzer): fix test

This commit is contained in:
Sebastian Beisch
2022-04-11 17:49:34 +02:00
committed by Felix Wiedmann
parent 0c7338ab13
commit 1d0c93b678
5 changed files with 3 additions and 8 deletions

View File

@@ -162,11 +162,11 @@ func (c *Changelog) GenerateChangelog(templateConfig shared.ChangelogTemplateCon
for _, commits := range analyzedCommits {
for _, commit := range commits {
_, ok := authors[commit.Author]
_, ok := authors[commit.Commit.Author]
if !ok {
authors[commit.Author] = 0
authors[commit.Commit.Author] = 0
}
authors[commit.Author] = authors[commit.Author] + 1
authors[commit.Commit.Author] = authors[commit.Commit.Author] + 1
if commit.Print {
if commit.IsBreaking {

View File

@@ -59,7 +59,6 @@ func TestChangelog(t *testing.T) {
analyzedCommits: map[shared.Release][]shared.AnalyzedCommit{
"minor": {
{
Author: "me",
Commit: shared.Commit{
Message: "feat(internal/changelog): my first commit",
Author: "me",
@@ -74,7 +73,6 @@ func TestChangelog(t *testing.T) {
MessageBlocks: map[string][]shared.MessageBlock{},
},
{
Author: "secondAuthor",
Commit: shared.Commit{
Message: "feat(internal/changelog): my second commit",
Author: "secondAuthor",