Skip to content
Snippets Groups Projects
Commit ad1e4f19 authored by timoknapp's avatar timoknapp Committed by Christoph Witzko
Browse files

feat: add 'prettified_output' flag in config

parent 79f1a369
No related branches found
No related tags found
No related merge requests found
...@@ -28,19 +28,19 @@ func formatCommit(c *semrel.Commit) string { ...@@ -28,19 +28,19 @@ func formatCommit(c *semrel.Commit) string {
var CGVERSION = "dev" var CGVERSION = "dev"
type DefaultChangelogGenerator struct { type DefaultChangelogGenerator struct {
prettifyOutput bool prettifiedOutput bool
} }
func (g *DefaultChangelogGenerator) Init(m map[string]string) error { func (g *DefaultChangelogGenerator) Init(m map[string]string) error {
prettifyOutput := false prettifiedOutput := false
prettifyConfig := m["prettify"] prettifyConfig := m["prettified_output"]
if prettifyConfig == "true" { if prettifyConfig == "true" {
prettifyOutput = true prettifiedOutput = true
} }
g.prettifyOutput = prettifyOutput g.prettifiedOutput = prettifiedOutput
return nil return nil
} }
...@@ -75,7 +75,7 @@ func (g *DefaultChangelogGenerator) Generate(changelogConfig *generator.Changelo ...@@ -75,7 +75,7 @@ func (g *DefaultChangelogGenerator) Generate(changelogConfig *generator.Changelo
continue continue
} }
prettifyPrefix := "" prettifyPrefix := ""
if g.prettifyOutput { if g.prettifiedOutput {
prettifyPrefix = ct.Emoji prettifyPrefix = ct.Emoji
} }
ret += fmt.Sprintf("#### %s%s\n\n%s\n", prettifyPrefix, ct.Text, ct.Content) ret += fmt.Sprintf("#### %s%s\n\n%s\n", prettifyPrefix, ct.Text, ct.Content)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment