-
Notifications
You must be signed in to change notification settings - Fork 913
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
feat: add rule for BREAKING CHANGE:
in header
#3838
base: master
Are you sure you want to change the base?
feat: add rule for BREAKING CHANGE:
in header
#3838
Conversation
`BREAKING CHANGE:` is a footer thing Fixed conventional-changelog#3810
Test fails for some reason, and I don't know how to debug it. Also,
|
https://www.conventionalcommits.org/en/v1.0.0/#specification According to the specs Does this make sense? I usually use it like this: 5b4aeaf Update: |
@escapedcat in the test https://github.com/conventional-changelog/commitlint/actions/runs/7404572868/job/20146281125?pr=3838
But it should have received So how to develop this without debug info? |
I think my main point was that |
@escapedcat, so the test for |
I think so, yes. It's only valid to add Should have noted that when you opened #3810 but didn't notice it back then. |
@escapedcat right, and the Jest test expects the test to return |
Not sure when I have time to look into it. console.log(JSON.stringify(YOUR_JEST_RESULT)) |
When I added
I got this error.
And thought that |
Now the most interesting part - The specification doesn't define
I should be checking |
I send PR to simplify the specification text conventional-commits/conventionalcommits.org#559 There is still no |
Tests are passing, but I still can't trigger the rule from the command line.
|
I assume the issue here is that it doesn't find a subject because the type already failes? |
That's what I thought too. How to do that? |
From my very short understanding of commitlint so far, what might be happening here is that when commitlint's parser finds "BREAKING CHANGE:" at the beginning of the header, in theory it should try to check if the string "BREAKING CHANGE" is part of the allowed types in the configuration, however, the regExp to extract the "potential" type (the string before the colon) might not be prepared to handle spaces, therefore it already fails to parse it. |
@knocte the regexp checks |
Ah true, but I was actually (mistakenly) referring to subject: if type cannot be parsed, then subject cannot either. |
BREAKING CHANGE:
in subjectBREAKING CHANGE:
in header
I changed the issue title to avoid subject/header confusion. It is still not clear why it doesn't trigger. |
Thanks people! We good here now? |
@escapedcat no, it is not clear how to debug why the rule doesn't trigger. |
Alright, let me switch this to draft for now |
Description
BREAKING CHANGE:
is a footer thingFixed #3810
Motivation and Context
Usage examples
How Has This Been Tested?
Types of changes
Checklist: