From e4c3c5b1d2c06b737f7f1b02c21f4a917e228631 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Mon, 2 Dec 2024 15:59:52 -0500 Subject: [PATCH] ci: allow more commit types in release notes (#9677) More commit types will now show in the release notes. The full list of allowable types are the following and will show in order: ```ts const commitTypesForChangelog = [ 'feat', 'fix', 'perf', 'refactor', 'docs', 'style', 'test', 'templates', 'examples', 'build', 'ci', 'chore', ] ``` --- .github/workflows/pr-title.yml | 3 +- scripts/utils/generateReleaseNotes.ts | 60 ++++++++++++++++++++------- 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 350a61923..3d83e2fde 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -24,14 +24,15 @@ jobs: chore ci docs + examples feat fix perf refactor revert style + templates test - types scopes: | cpa db-\* diff --git a/scripts/utils/generateReleaseNotes.ts b/scripts/utils/generateReleaseNotes.ts index b77826b5c..4d5c1eb4d 100755 --- a/scripts/utils/generateReleaseNotes.ts +++ b/scripts/utils/generateReleaseNotes.ts @@ -51,6 +51,8 @@ export const generateReleaseNotes = async (args: Args = {}): Promise = { + feat: '๐Ÿš€ Features', + fix: '๐Ÿ› Bug Fixes', + perf: 'โšก Performance', + refactor: '๐Ÿ›  Refactors', + docs: '๐Ÿ“š Documentation', + style: '๐ŸŽจ Styles', + test: '๐Ÿงช Tests', + templates: '๐Ÿ“ Templates', + examples: '๐Ÿ““ Examples', + build: '๐Ÿ”จ Build', + ci: 'โš™๏ธ CI', + chore: '๐Ÿก Chores', + breaking: 'โš ๏ธ BREAKING CHANGES', + } const sections = conventionalCommits.reduce( (sections, c) => { @@ -69,12 +103,16 @@ export const generateReleaseNotes = async (args: Args = {}): Promise, + {} as Record, ) // Sort commits by scope, unscoped first @@ -96,18 +134,10 @@ export const generateReleaseNotes = async (args: Args = {}): Promise