module.exports = {
types: [
{ types: ["feat", "feature"], label: "π New Features" },
{ types: ["fix", "bugfix"], label: "π Bugfixes" },
{ types: ["improvements", "enhancement"], label: "π¨ Improvements" },
{ types: ["perf"], label: "ποΈ Performance Improvements" },
{ types: ["build", "ci"], label: "ποΈ Build System" },
{ types: ["refactor"], label: "πͺ Refactors" },
{ types: ["doc", "docs"], label: "π Documentation Changes" },
{ types: ["test", "tests"], label: "π Tests" },
{ types: ["style"], label: "π
Code Style Changes" },
{ types: ["chore"], label: "π§Ή Chores" },
{ types: ["other"], label: "Other Changes" }
],
excludeTypes: ["other"],
capitalizeFirstLetter: function (string) {
return string.charAt(0).toUpperCase() + string.slice(1)
},
renderTypeSection: function (label, commits) {
let text = `\n## ${label}\n`
commits.forEach((commit) => {
const capitalizedSubject = this.capitalizeFirstLetter(commit.subject)
text += `- ${capitalizedSubject} ${commit.sha.slice(0, 7)}\n`
})
return text
},
renderChangelog: function (release, changes) {
const now = new Date()
return (
`# ${release} - ${now.toISOString().substr(0, 10)}\n` + changes + "\n\n"
)
}
}