feat(changelog): omit version heading in forge release notes

The forge ui usually shows the release name right above the description,
so this removes an unecessary duplicate bit of information.

In addition this also cleans up the changelog interface a bit and moves
functionality where it belongs. Prepares a bit for custom changelogs in
the future.

Closes #32
This commit is contained in:
Julian Tölle 2024-09-22 14:00:30 +02:00 committed by GitHub
parent 997b6492de
commit 2621c48d75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 71 additions and 34 deletions

View file

@ -168,7 +168,8 @@ This version is compatible with flux-compensator v2.2 - v2.9.
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := NewChangelogEntry(slog.Default(), tt.args.analyzedCommits, tt.args.version, tt.args.link, tt.args.prefix, tt.args.suffix)
data := New(commitparser.ByType(tt.args.analyzedCommits), tt.args.version, tt.args.link, tt.args.prefix, tt.args.suffix)
got, err := Entry(slog.Default(), DefaultTemplate(), data, Formatting{})
if !tt.wantErr(t, err) {
return
}