-
Notifications
You must be signed in to change notification settings - Fork 8
/
changelog.config.js
75 lines (66 loc) · 1.73 KB
/
changelog.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import isCI from 'is-ci'
if (!isCI) {
const dotenv = await import('dotenv')
dotenv.config({ path: './.env' })
}
const isOverride = process.env.GIT_CZ__OVERRIDE_TEST
const enabled = isOverride
/**
* @note lol, this will not get picked up in release releaseNotes
* unless we _also_ pass this configuration to it 🥴️
*/
const _types = {
override: {
branch: false,
code: ':sunrise_over_mountains:',
commit: 'override',
description: 'Custom type => override.',
emoji: '🌄️',
entity: 'F304;',
name: 'override',
semver: null,
},
}
const commit = isOverride
? {
after: { branchName: ' ', emoji: ' ', scope: ') ' },
before: { branchName: '', emoji: '', scope: '(' },
format: '{emoji}{scope}{branchName}{subject}',
maxMessageLength: 64,
minMessageLength: 3,
questions: [
'branchFlag',
'commitBreakingFlag',
'commitBreaking',
// 'commitScopes',
'commitTypes',
'commitSubject',
'commitBodyFlag',
'commitBody',
],
// @question dynamic?
scopes: [
'',
'cs', // codestyle
'cz', // git-cz
'ds', // design-system
'gitmoji', // conventional-gitmoji
'notion', // notion
'scripts', // scripts
'semantic', // semantic
'spotify', // spotify
'utils', // u
],
}
: {}
const branch = isOverride
? {
format: '{branchType}{branchName}',
prefix: '',
questions: ['branchFlag', 'branchTypes', 'branchName'],
url: 'https://github.com/JeromeFitz/packages/issues/',
}
: {}
const types = isOverride ? _types : {}
const changelog = { branch, commit, enabled, types }
export default changelog