Skip to content

Commit 9a76f96

Browse files
committed
feat: add presetConfig to commit-analyzer step
- which is noted as being a required field - link: https://github.com/semantic-release/commit-analyzer/tree/v11.0.0#options
1 parent e8d8e73 commit 9a76f96

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

release.config.js

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
/* eslint-disable no-template-curly-in-string */
22

3+
const conventionalCommitPresetConfig = {
4+
types: [
5+
{ type: 'feat', section: 'Features' },
6+
{ type: 'fix', section: 'Fixes' },
7+
{ type: 'chore', hidden: false, section: 'Other' },
8+
{ type: 'docs', hidden: false, section: 'Other' },
9+
{ type: 'style', hidden: false, section: 'Other' },
10+
{ type: 'refactor', hidden: false, section: 'Other' },
11+
{ type: 'perf', hidden: false, section: 'Other' },
12+
{ type: 'revert', hidden: false, section: 'Other ' },
13+
{ type: 'test', hidden: false, section: 'Other ' },
14+
{ type: 'build', hidden: false, section: 'Other' },
15+
{ type: 'ci', hidden: true },
16+
],
17+
};
18+
319
/**
420
* config for Semantic Release workflow
521
* docs: https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration
@@ -22,28 +38,15 @@ module.exports = {
2238
{ type: 'fix', release: 'patch' },
2339
{ type: 'perf', release: 'patch' },
2440
],
41+
presetConfig: conventionalCommitPresetConfig,
2542
},
2643
],
2744
// create CHANGELOG text for changelog and commit description
2845
[
2946
'@semantic-release/release-notes-generator',
3047
{
3148
preset: 'conventionalcommits',
32-
presetConfig: {
33-
types: [
34-
{ type: 'feat', section: 'Features' },
35-
{ type: 'fix', section: 'Fixes' },
36-
{ type: 'chore', hidden: false, section: 'Other' },
37-
{ type: 'docs', hidden: false, section: 'Other' },
38-
{ type: 'style', hidden: false, section: 'Other' },
39-
{ type: 'refactor', hidden: false, section: 'Other' },
40-
{ type: 'perf', hidden: false, section: 'Other' },
41-
{ type: 'revert', hidden: false, section: 'Other ' },
42-
{ type: 'test', hidden: false, section: 'Other ' },
43-
{ type: 'build', hidden: false, section: 'Other' },
44-
{ type: 'ci', hidden: true },
45-
],
46-
},
49+
presetConfig: conventionalCommitPresetConfig,
4750
},
4851
],
4952
// edits CHANGELOG.md

0 commit comments

Comments
 (0)