At our company we are moving from svn to git. For issue tracking we use JIRA from Atlassian.
Now we want to enforce that every commit message contains an issue numbe
If you are using npm you can use https://github.com/typicode/husky with https://github.com/marionebl/commitlint
Create file: commitlint.config.js
module.exports = {
rules: {
'references-empty': [2, 'never']
},
parserPreset: {
parserOpts: {
issuePrefixes: ['REF-']
}
}};
and add config for the hook in package.json
commit-msg: commitlint -E HUSKY_GIT_PARAMS