Skip to content

Commit ea6309c

Browse files
Refactor: Reorganize commit groups in changelog
This commit refactors the `commitParsers` array in `generate-changelog.js` to create more specific commit groups in the changelog. - "Refactors" is now a standalone category, distinct from "Enhancements". - "Build, Dependencies & Meta" has been split into three more granular groups: "Build", "Dependencies", and "Meta". This change aims to provide a clearer and more organized overview of changes in the generated changelog. Signed-off-by: CreativeCodeCat <wayne6324@gmail.com>
1 parent 2889410 commit ea6309c

File tree

1 file changed

+37
-28
lines changed

1 file changed

+37
-28
lines changed

generate-changelog.js

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,53 @@ function log(...args) {
3131

3232
// Commit parsing rules
3333
const commitParsers = [
34-
// skip some "noise" commits
35-
{ message: /^chore\(release\): prepare for/i, skip: true },
36-
{ message: /^chore\(deps.*\)/i, skip: true },
37-
{ message: /^chore\(change.*\)/i, skip: true },
38-
{ message: /^chore\(pr\)/i, skip: true },
39-
{ message: /^chore\(pull\)/i, skip: true },
40-
{ message: /^fixes/i, skip: true },
34+
// Skip some "noise" commits
35+
{ message: /^chore\(release\): prepare for/i, skip: true },
36+
{ message: /^chore\(deps.*\)/i, skip: true },
37+
{ message: /^chore\(change.*\)/i, skip: true },
38+
{ message: /^chore\(pr\)/i, skip: true },
39+
{ message: /^chore\(pull\)/i, skip: true },
40+
{ message: /^fixes/i, skip: true },
4141

42-
// Enhancements (new features, improvements, UX, performance, refactors)
43-
{ message: /^feat|^perf|^refactor|^style|^ui|^ux/i, group: "### Enhancements:" },
42+
// Enhancements (new features, improvements, UX, performance)
43+
{ message: /^feat|^perf|^style|^ui|^ux/i, group: "### Enhancements:" },
4444

45-
// Bug fixes & hotfixes
46-
{ message: /^fix|^bug|^hotfix|^emergency/i, group: "### Bug Fixes:" },
45+
// Bug fixes & hotfixes
46+
{ message: /^fix|^bug|^hotfix|^emergency/i, group: "### Bug Fixes:" },
4747

48-
// Documentation & language/i18n
49-
{ message: /^doc|^lang|^i18n/i, group: "### Documentation & Language:" },
48+
// Refactors (own category after Bug Fixes)
49+
{ message: /^refactor/i, group: "### Refactors:" },
5050

51-
// Security
52-
{ message: /^security/i, group: "### Security:" },
51+
// Documentation & language/i18n
52+
{ message: /^doc|^lang|^i18n/i, group: "### Documentation & Language:" },
5353

54-
// Reverts
55-
{ message: /^revert/i, group: "### Reverts:" },
54+
// Security
55+
{ message: /^security/i, group: "### Security:" },
5656

57-
// Build, dependencies, configuration, CI/CD, versioning, release
58-
{ message: /^build|^dependency|^deps|^config|^configuration|^ci|^pipeline|^release|^version|^versioning/i,
59-
group: "### Build, Dependencies & Meta:" },
57+
// Reverts
58+
{ message: /^revert/i, group: "### Reverts:" },
6059

61-
// Tests
62-
{ message: /^test/i, group: "### Tests:" },
60+
// Build-related
61+
{ message: /^build/i, group: "### Build:" },
6362

64-
// Infrastructure & Ops
65-
{ message: /^infra|^infrastructure|^ops/i, group: "### Infrastructure & Ops:" },
63+
// Dependencies-related
64+
{ message: /^dependency|^deps/i, group: "### Dependencies:" },
6665

67-
// Chore & cleanup
68-
{ message: /^chore|^housekeeping|^cleanup|^clean\(up\)/i, group: "### Maintenance & Cleanup:" },
66+
// Meta: configuration, CI/CD, versioning, releases
67+
{ message: /^config|^configuration|^ci|^pipeline|^release|^version|^versioning/i,
68+
group: "### Meta:" },
6969

70-
// Feature removal / drops
71-
{ message: /^drop|^remove/i, group: "### Feature Removals:" },
70+
// Tests
71+
{ message: /^test/i, group: "### Tests:" },
72+
73+
// Infrastructure & Ops
74+
{ message: /^infra|^infrastructure|^ops/i, group: "### Infrastructure & Ops:" },
75+
76+
// Chore & cleanup
77+
{ message: /^chore|^housekeeping|^cleanup|^clean\(up\)/i, group: "### Maintenance & Cleanup:" },
78+
79+
// Feature removal / drops
80+
{ message: /^drop|^remove/i, group: "### Feature Removals:" },
7281
];
7382

7483
// Build group order directly from commitParsers

0 commit comments

Comments
 (0)