Skip to content

Commit 88b62cc

Browse files
authored
fix: show chores in release notes (#2544)
Fixes #2494
1 parent e32719c commit 88b62cc

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

internal/librarian/release_notes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var (
5656
"perf",
5757
"revert",
5858
"docs",
59+
"chore",
5960
}
6061

6162
shortSHA = func(sha string) string {

internal/librarian/release_notes_test.go

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,43 @@ Language Image: go:1.21
11941194
ghRepo: &github.Repository{},
11951195
wantReleaseNote: fmt.Sprintf("Librarian Version: %s\nLanguage Image: go:1.21", librarianVersion),
11961196
},
1197+
{
1198+
name: "generate with chore",
1199+
state: &config.LibrarianState{
1200+
Image: "go:1.21",
1201+
Libraries: []*config.LibraryState{
1202+
{
1203+
ID: "my-library",
1204+
// this is the newVersion in the release note.
1205+
Version: "1.1.0",
1206+
PreviousVersion: "1.0.0",
1207+
ReleaseTriggered: true,
1208+
Changes: []*conventionalcommits.ConventionalCommit{
1209+
{
1210+
Type: "chore",
1211+
Subject: "some chore",
1212+
Body: "this is the body",
1213+
CommitHash: hash1.String(),
1214+
IsNested: true,
1215+
},
1216+
},
1217+
},
1218+
},
1219+
},
1220+
ghRepo: &github.Repository{Owner: "owner", Name: "repo"},
1221+
wantReleaseNote: fmt.Sprintf(`Librarian Version: %s
1222+
Language Image: go:1.21
1223+
<details><summary>my-library: 1.1.0</summary>
1224+
1225+
## [1.1.0](https://github.com/owner/repo/compare/my-library-1.0.0...my-library-1.1.0) (%s)
1226+
1227+
### Miscellaneous Chores
1228+
1229+
* some chore ([1234567](https://github.com/owner/repo/commit/1234567))
1230+
1231+
</details>`,
1232+
librarianVersion, today),
1233+
},
11971234
} {
11981235
t.Run(test.name, func(t *testing.T) {
11991236
t.Parallel()

0 commit comments

Comments
 (0)