Skip to content

Commit

Permalink
fix: api
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 7, 2021
1 parent b987d0b commit cd655b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 3_transformer/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func Transform(g *client.GitClient, splices []*extractor.ExtractSplice) ([]*Temp
}

msg := conventionalcommitparser.Parse(commit.Message)
header := msg.GetHeader()
header := msg.ParseHeader()

field := msg

Expand All @@ -169,7 +169,7 @@ func Transform(g *client.GitClient, splices []*extractor.ExtractSplice) ([]*Temp
}

if field.Footer != nil && len(field.Footer) > 0 {
breakingChangeFooter := field.GetFooterField("BREAKING CHANGE", "BREAKING CHANGES", "BREAKING-CHANGE", "BREAKING-CHANGES")
breakingChangeFooter := field.GetFooterByField("BREAKING CHANGE", "BREAKING CHANGES", "BREAKING-CHANGE", "BREAKING-CHANGES")

if breakingChangeFooter != nil {
if ctx.BreakingChanges == nil {
Expand All @@ -187,7 +187,7 @@ func Transform(g *client.GitClient, splices []*extractor.ExtractSplice) ([]*Temp
}

if header.Type == "revert" {
revertFooter := field.GetFooterField("revert", "Revert")
revertFooter := field.GetFooterByField("revert", "Revert")

if revertFooter != nil {
revertHash := revertFooter.Content
Expand Down

0 comments on commit cd655b3

Please sign in to comment.