diff --git a/internal/analyzer/angular.go b/internal/analyzer/angular.go index 193f794..a938a49 100644 --- a/internal/analyzer/angular.go +++ b/internal/analyzer/angular.go @@ -111,7 +111,6 @@ func (a *angular) analyze(commit shared.Commit, rule Rule) *shared.AnalyzedCommi analyzed := &shared.AnalyzedCommit{ Commit: commit, - Author: commit.Author, Tag: rule.Tag, TagString: rule.TagString, Scope: shared.Scope(matches["scope"]), diff --git a/internal/analyzer/conventional.go b/internal/analyzer/conventional.go index 2b45f53..e2b4b72 100644 --- a/internal/analyzer/conventional.go +++ b/internal/analyzer/conventional.go @@ -111,7 +111,6 @@ func (a *conventional) analyze(commit shared.Commit, rule Rule) *shared.Analyzed analyzed := &shared.AnalyzedCommit{ Commit: commit, - Author: commit.Author, Tag: rule.Tag, TagString: rule.TagString, Scope: shared.Scope(matches["scope"]), diff --git a/internal/changelog/changelog.go b/internal/changelog/changelog.go index e1c5772..1a178f6 100644 --- a/internal/changelog/changelog.go +++ b/internal/changelog/changelog.go @@ -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 { diff --git a/internal/changelog/changelog_test.go b/internal/changelog/changelog_test.go index 1d3e830..f38f9fe 100644 --- a/internal/changelog/changelog_test.go +++ b/internal/changelog/changelog_test.go @@ -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", diff --git a/internal/shared/shared.go b/internal/shared/shared.go index 7f01b2e..cbde9f0 100644 --- a/internal/shared/shared.go +++ b/internal/shared/shared.go @@ -37,7 +37,6 @@ type ChangelogTemplateConfig struct { type AnalyzedCommit struct { Commit Commit `yaml:"commit"` ParsedMessage string `yaml:"parsedMessage"` - Author string `yaml:"author"` ParsedBreakingChangeMessage string `yaml:"parsedBreakingChangeMessage"` Tag string `yaml:"tag"` TagString string `yaml:"tagString"`