mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 13:21:00 +00:00
feat: highlight breaking changes in release notes (#234)
Add a `**BREAKING**` prefix to any entries in the changelog that are marked as breaking changes. Closes #225
This commit is contained in:
parent
5306e2dd35
commit
48b1894cac
2 changed files with 18 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{{define "entry" -}}
|
{{define "entry" -}}
|
||||||
- {{ if .Scope }}**{{.Scope}}**: {{end}}{{.Description}}
|
- {{ if .BreakingChange}}**BREAKING**: {{end}}{{ if .Scope }}**{{.Scope}}**: {{end}}{{.Description}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{- if not .Formatting.HideVersionTitle }}
|
{{- 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",
|
want: "## [1.0.0](https://example.com/1.0.0)\n\n### Features\n\n- Foobar!\n",
|
||||||
wantErr: assert.NoError,
|
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",
|
name: "single fix",
|
||||||
args: args{
|
args: args{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue