mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
feat: highlight breaking changes in release notes
Add a `**BREAKING**` prefix to any entries in the changelog that are marked as breaking changes. Closes #225
This commit is contained in:
parent
f1aa1a2ef4
commit
4acafb6132
2 changed files with 18 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{{define "entry" -}}
|
||||
- {{ if .Scope }}**{{.Scope}}**: {{end}}{{.Description}}
|
||||
- {{ if .BreakingChange}}**BREAKING**: {{end}}{{ if .Scope }}**{{.Scope}}**: {{end}}{{.Description}}
|
||||
{{ end }}
|
||||
|
||||
{{- if not .Formatting.HideVersionTitle }}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,23 @@ func Test_NewChangelogEntry(t *testing.T) {
|
|||
want: "## [1.0.0](https://example.com/1.0.0)\n\n### Features\n\n- Foobar!\n",
|
||||
wantErr: assert.NoError,
|
||||
},
|
||||
{
|
||||
name: "single breaking change",
|
||||
args: args{
|
||||
analyzedCommits: []commitparser.AnalyzedCommit{
|
||||
{
|
||||
Commit: git.Commit{},
|
||||
Type: "feat",
|
||||
Description: "Foobar!",
|
||||
BreakingChange: true,
|
||||
},
|
||||
},
|
||||
version: "1.0.0",
|
||||
link: "https://example.com/1.0.0",
|
||||
},
|
||||
want: "## [1.0.0](https://example.com/1.0.0)\n\n### Features\n\n- **BREAKING**: Foobar!\n",
|
||||
wantErr: assert.NoError,
|
||||
},
|
||||
{
|
||||
name: "single fix",
|
||||
args: args{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue