-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathchangelog.config.js
41 lines (40 loc) · 1007 Bytes
/
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
let titles = {
feat: "🚀 Features",
fix: "🐛 Bug Fixes",
perf: "🏎 Performance Improvement",
docs: "📓 Documentation",
style: "🎨 Style",
refactor: "🔧 Code Refactoring",
test: "🧪 Tests",
build: "🏗️ Build System & Dependencies",
chore: "🧹 Misc. Chores",
ci: "⚗️ Continuous Integration",
};
module.exports = {
writerOpts: {
transform: (commit) => {
console.log(commit);
commit.type = titles[commit.type];
commit.shortHash = commit.hash.substring(0, 7);
return commit;
},
commitGroupsSort: (a, b) => {
const tags = [
"Breaking",
titles["feat"],
titles["fix"],
titles["refactor"],
titles["test"],
titles["perf"],
titles["docs"],
titles["build"],
titles["ci"],
titles["chore"],
titles["style"],
];
let rankA = tags.indexOf(a.title);
let rankB = tags.indexOf(b.title);
return rankA - rankB;
},
},
};