-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match IDs? #95
Comments
This feature is not implemented yet. There is a PR taking a stab at it: https://github.com/marionebl/commitlint/pull/76, where I added an outline how this could work: // commitlint.config.js
module.exports = {
parserPreset: './parser-preset',
rules: {
'references-empty': [2, 'never'],
// extended use case, check if id is present
'references-enum': getIssueIds().then((ids) => [2, 'always', ids])
}
}
// parser-preset
module.exports = {
paserOpts: {
issuePrefixes: ['PRJ-', 'MFB-']
}
}; |
@AustinMatherne Would the feature match your use case? |
@marionebl What is the value of I'm matching against thousands of numerical IDs. Generating an array of them is easy enough, but seems less than ideal. Thanks! |
It is an
I'd like to keep parsing/regexp matching out of |
In theory validating the ID against a real Jira story would be nice, but there's no way my team would accept an online requirement in order to make commits. Instead I'd have to create an array for every value between "0" and at least "99999". |
@AustinMatherne I created a plugin and a config special for JIRA commit messages style commitlint-jira ;) I think this will be useful for you :) |
Can commitlint validate numerical IDs?
The text was updated successfully, but these errors were encountered: