diff --git a/__snapshots__/default-changelog-notes.ts.js b/__snapshots__/default-changelog-notes.ts.js index 1116f347e..5ef1b2778 100644 --- a/__snapshots__/default-changelog-notes.ts.js +++ b/__snapshots__/default-changelog-notes.ts.js @@ -52,6 +52,10 @@ exports['DefaultChangelogNotes buildNotes should handle BREAKING CHANGE notes 1' * some bugfix ([sha2](https://github.com/googleapis/java-asset/commit/sha2)) ` +exports['DefaultChangelogNotes buildNotes should ignore "chore: release" commits 1'] = ` +## [1.2.3](https://github.com/googleapis/java-asset/compare/v1.2.2...v1.2.3) (1983-10-10) +` + exports['DefaultChangelogNotes buildNotes should ignore RELEASE AS notes 1'] = ` ## [1.2.3](https://github.com/googleapis/java-asset/compare/v1.2.2...v1.2.3) (1983-10-10) diff --git a/test/changelog-notes/default-changelog-notes.ts b/test/changelog-notes/default-changelog-notes.ts index 60d0d55f7..f53b4a09d 100644 --- a/test/changelog-notes/default-changelog-notes.ts +++ b/test/changelog-notes/default-changelog-notes.ts @@ -127,6 +127,28 @@ describe('DefaultChangelogNotes', () => { expect(notes).to.is.string; safeSnapshot(notes); }); + it('should ignore "chore: release" commits', async () => { + const commits = [ + { + sha: 'sha2', + message: 'chore: release main', + files: ['path1/file1.rb'], + type: 'chore', + scope: null, + bareMessage: 'release main', + notes: [], + references: [], + breaking: false, + }, + ]; + const changelogNotes = new DefaultChangelogNotes(); + const notes = await changelogNotes.buildNotes(commits, { + ...notesOptions, + changelogSections: [{type: 'chore', section: 'Chores', hidden: false}], + }); + expect(notes).to.is.string; + safeSnapshot(notes); + }); describe('with commit parsing', () => { it('should handle a breaking change', async () => { const commits = [buildMockCommit('fix!: some bugfix')];