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{
|
analyzed := &shared.AnalyzedCommit{
|
||||||
Commit: commit,
|
Commit: commit,
|
||||||
Author: commit.Author,
|
|
||||||
Tag: rule.Tag,
|
Tag: rule.Tag,
|
||||||
TagString: rule.TagString,
|
TagString: rule.TagString,
|
||||||
Scope: shared.Scope(matches["scope"]),
|
Scope: shared.Scope(matches["scope"]),
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ func (a *conventional) analyze(commit shared.Commit, rule Rule) *shared.Analyzed
|
|||||||
|
|
||||||
analyzed := &shared.AnalyzedCommit{
|
analyzed := &shared.AnalyzedCommit{
|
||||||
Commit: commit,
|
Commit: commit,
|
||||||
Author: commit.Author,
|
|
||||||
Tag: rule.Tag,
|
Tag: rule.Tag,
|
||||||
TagString: rule.TagString,
|
TagString: rule.TagString,
|
||||||
Scope: shared.Scope(matches["scope"]),
|
Scope: shared.Scope(matches["scope"]),
|
||||||
|
|||||||
@@ -162,11 +162,11 @@ func (c *Changelog) GenerateChangelog(templateConfig shared.ChangelogTemplateCon
|
|||||||
for _, commits := range analyzedCommits {
|
for _, commits := range analyzedCommits {
|
||||||
for _, commit := range commits {
|
for _, commit := range commits {
|
||||||
|
|
||||||
_, ok := authors[commit.Author]
|
_, ok := authors[commit.Commit.Author]
|
||||||
if !ok {
|
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.Print {
|
||||||
if commit.IsBreaking {
|
if commit.IsBreaking {
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ func TestChangelog(t *testing.T) {
|
|||||||
analyzedCommits: map[shared.Release][]shared.AnalyzedCommit{
|
analyzedCommits: map[shared.Release][]shared.AnalyzedCommit{
|
||||||
"minor": {
|
"minor": {
|
||||||
{
|
{
|
||||||
Author: "me",
|
|
||||||
Commit: shared.Commit{
|
Commit: shared.Commit{
|
||||||
Message: "feat(internal/changelog): my first commit",
|
Message: "feat(internal/changelog): my first commit",
|
||||||
Author: "me",
|
Author: "me",
|
||||||
@@ -74,7 +73,6 @@ func TestChangelog(t *testing.T) {
|
|||||||
MessageBlocks: map[string][]shared.MessageBlock{},
|
MessageBlocks: map[string][]shared.MessageBlock{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Author: "secondAuthor",
|
|
||||||
Commit: shared.Commit{
|
Commit: shared.Commit{
|
||||||
Message: "feat(internal/changelog): my second commit",
|
Message: "feat(internal/changelog): my second commit",
|
||||||
Author: "secondAuthor",
|
Author: "secondAuthor",
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ type ChangelogTemplateConfig struct {
|
|||||||
type AnalyzedCommit struct {
|
type AnalyzedCommit struct {
|
||||||
Commit Commit `yaml:"commit"`
|
Commit Commit `yaml:"commit"`
|
||||||
ParsedMessage string `yaml:"parsedMessage"`
|
ParsedMessage string `yaml:"parsedMessage"`
|
||||||
Author string `yaml:"author"`
|
|
||||||
ParsedBreakingChangeMessage string `yaml:"parsedBreakingChangeMessage"`
|
ParsedBreakingChangeMessage string `yaml:"parsedBreakingChangeMessage"`
|
||||||
Tag string `yaml:"tag"`
|
Tag string `yaml:"tag"`
|
||||||
TagString string `yaml:"tagString"`
|
TagString string `yaml:"tagString"`
|
||||||
|
|||||||
Reference in New Issue
Block a user