Skip to content

Commit 5fd3b27

Browse files
authored
improve release changelog (#79)
1 parent c31b2a3 commit 5fd3b27

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.release-it.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,30 @@ const config: Config = {
2727
'@release-it/conventional-changelog': {
2828
preset: 'angular',
2929
infile: 'CHANGELOG.md',
30+
parserOpts: {
31+
headerPattern: /^(?:\[(.*)\]\s*)?(\w*)(?:\((.*)\))?: (.*)$/,
32+
headerCorrespondence: ['ticket', 'type', 'scope', 'subject'],
33+
},
34+
writerOpts: {
35+
transform: (commit: any) => {
36+
// Make sure chore commits are included
37+
if (commit.type === 'feat') {
38+
commit.type = '✨ Features';
39+
} else if (commit.type === 'fix') {
40+
commit.type = '🐛 Bug Fixes';
41+
} else if (commit.type === 'chore') {
42+
commit.type = '🔧 Chores';
43+
} else if (commit.type === 'refactor') {
44+
commit.type = '♻️ Refactoring';
45+
} else {
46+
return; // Hide other types
47+
}
48+
49+
commit.subject = commit.header
50+
51+
return commit;
52+
},
53+
},
3054
},
3155
},
3256
};

0 commit comments

Comments
 (0)