Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description: ' 变更的模块名'
},
subject: {
description: ' 变更的摘要信息'
},
body: {
description: ' 附加的变更说明',
multline: true
},
footer: {
description: '<footer> 提供进一步的重大调整说明等信息',
multiline: true
}
});
let changeTypes = settings.type.enumerables;
const COMMIT_TYPES = Object.keys(changeTypes).map(
k => ({name: k, note: changeTypes[k].description})
);
function padding(value, len, isRight = true) {
let curr = value.length;
if (curr < len) {
let whitespaces = '';
for (let i = 0, num = len - curr; i < num; i++) {
whitespaces += ' ';
}
isRight ? (value += whitespaces) : (value = whitespaces + value);
}
return value;
}
</footer>
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 120],
'scope-enum': ctx => [2, 'always', getPackages(ctx)],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [2, 'always', Object.keys(settings.type.enumerables)]
}
};
const prompt = () => prompter(_, commit);