-
Notifications
You must be signed in to change notification settings - Fork 933
Github/Gitlab issue ID support (in subject) #397
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
Comments
Please provide also the error output created by commitlint. |
This feature can be very useful and it's value is very high, imho. I suggest to extend it to header, body and footer too in order to give to commitlint user every customization In my company we need to check the Jira task ID link in body e we are looking for a feature like the suggested one |
Being able to do this by allowing regular expressions seems like a good solution. Alternately, being able to provide a function (instead of array/string) to the 'some-config': [2, 'always', (commit) => validateThing(commit)] |
Hi guys! That does seem like a good solution. But if it can be created with a rule, why not add it too 😄 I would love to try and see if we can create a dedicated rule for such a thing! But for that, I need some use cases and examples. What commits do you want to validate and what should or shouldn't pass? Are you talking about commits with something like this?
And to validate based on the existence of |
This is why I think it's simpler to allow for regular expressions or functions, because in my case it's a letter-code followed by numerical identifier. Other people could also have varied cases. |
Ah ok, so commitlint is using the conventional commit parser. This parser includes a reference regex. It's a bit buried deep down in the code, but that's why I was thinking about creating a rule. Sounds like it could be interesting to create a rule which uses that parsed value, but that requires you to "extend" the parser config when using forms like:
|
Yes, If this kind of rule or user can create custom rules for their use that would be good. |
I've created a plugin I hope this helps! |
Closing this in favour of https://commitlint.js.org/#/reference-plugins |
Expected Behavior
Github/Gitlab issue ID (e.g.
#123
,#6778
) can be added as references into subject.Current Behavior
subject-case
now only allows charactersAffected packages
Possible Solution
Add
regex
pattern supports tosubject-case
, for now, I have to disablesubject-case
which doesn't make sense.commitlint.config.js
Context
Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: