You've already forked go-semantic-release
test(analyzer): fix test
This commit is contained in:
committed by
Felix Wiedmann
parent
0c7338ab13
commit
1d0c93b678
@@ -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"]),
|
||||
|
||||
@@ -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"]),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user