Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
changelog-generator-default
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
go-semantic-release
changelog-generator-default
Commits
ad1e4f19
Commit
ad1e4f19
authored
4 years ago
by
timoknapp
Committed by
Christoph Witzko
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: add 'prettified_output' flag in config
parent
79f1a369
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/generator/changelog_generator.go
+6
-6
6 additions, 6 deletions
pkg/generator/changelog_generator.go
with
6 additions
and
6 deletions
pkg/generator/changelog_generator.go
+
6
−
6
View file @
ad1e4f19
...
@@ -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
{
prettif
y
Output
bool
prettif
ied
Output
bool
}
}
func
(
g
*
DefaultChangelogGenerator
)
Init
(
m
map
[
string
]
string
)
error
{
func
(
g
*
DefaultChangelogGenerator
)
Init
(
m
map
[
string
]
string
)
error
{
prettif
y
Output
:=
false
prettif
ied
Output
:=
false
prettifyConfig
:=
m
[
"prettif
y
"
]
prettifyConfig
:=
m
[
"prettif
ied_output
"
]
if
prettifyConfig
==
"true"
{
if
prettifyConfig
==
"true"
{
prettif
y
Output
=
true
prettif
ied
Output
=
true
}
}
g
.
prettif
y
Output
=
prettif
y
Output
g
.
prettif
ied
Output
=
prettif
ied
Output
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
.
prettif
y
Output
{
if
g
.
prettif
ied
Output
{
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment