You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my commit convention defined as '[JIRA ID]? [type] subject', I have described this commit convention using commitlint. How can I generate the CHANGELOG.md using this convention using commit-and-tag?
Below is the the code for me commitlint.config.js
module.exports = {
parserPreset: {
parserOpts: {
headerPattern: /^\[(\w+-\d+)\] (\w+): (.+)/,
headerCorrespondence: ["scope", "type", "subject"],
},
},
plugins: [
{
rules: {
"header-match-team-pattern": (parsed) => {
const { type, scope, subject } = parsed;
console.log(parsed);
if (type === null && scope === null && subject === null) {
return [
false,
"header must be in format '[JIRA ID]? [type] subject'",
];
}
return [true, ""];
},
"scope-type-enum": (parsed, _when, expectedValue) => {
const { type} = parsed;
if (type && !expectedValue.includes(type)) {
return [
false,
`type must be one of ${expectedValue}`,
];
}
return [true, ""];
},
},
},
],
rules: {
"header-match-team-pattern": [2, "always"],
"scope-type-enum": [2, "always", ["fix", "feat","chore"]], // custom rule defined in plugins
},
};
The text was updated successfully, but these errors were encountered:
I have my commit convention defined as '[JIRA ID]? [type] subject', I have described this commit convention using commitlint. How can I generate the CHANGELOG.md using this convention using commit-and-tag?
Below is the the code for me commitlint.config.js
The text was updated successfully, but these errors were encountered: