You've already forked go-semantic-release
feat(analyzer): update AnalyzedCommit to add flexibility in parsing a message
This provides flexibility of parsing and rendering structured messages with more detail in the changelog and helps extract metadata from the message. The new structure can be used to split a message in multiple blocks (e.g. footer)
This commit is contained in:
@@ -37,13 +37,22 @@ type ChangelogTemplateConfig struct {
|
||||
type AnalyzedCommit struct {
|
||||
Commit Commit `yaml:"commit"`
|
||||
ParsedMessage string `yaml:"parsedMessage"`
|
||||
Scope Scope `yaml:"scope"`
|
||||
ParsedBreakingChangeMessage string `yaml:"parsedBreakingChangeMessage"`
|
||||
Tag string `yaml:"tag"`
|
||||
TagString string `yaml:"tagString"`
|
||||
Scope Scope `yaml:"scope"`
|
||||
Subject string `yaml:"subject"`
|
||||
MessageBlocks map[string][]MessageBlock `yaml:"messageBlocks"`
|
||||
IsBreaking bool `yaml:"isBreaking"`
|
||||
Print bool `yaml:"print"`
|
||||
}
|
||||
|
||||
// MessageBlock represents a block in the body section of a commit message
|
||||
type MessageBlock struct {
|
||||
Label string `yaml:"label""`
|
||||
Content string `yaml:"content"`
|
||||
}
|
||||
|
||||
//Scope of the commit, like feat, fix,..
|
||||
type Scope string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user