-
Notifications
You must be signed in to change notification settings - Fork 934
Default "longer description" is always "-" #2971
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
@dangreen if you changed it and all existing tests are still I green I guess we could revert this. |
@escapedcat @dangreen I don't think this is the solution. As you can see from the line, this behavior was always there. Unfortunately because of the wrongly used "??" instead of "||" it never actually got to the point of using "-" as the default value when all the other body types are empty was never triggered due to always having an empty body (first occurrence). See the attached screen for the different behavior between using "??" and "||". If we revert this, the issueBody and breakingBody will never be triggered and my newly created test in the library to check this would fail. As seen below (not sure what was tested then): I would suggest just removing the default "-" at the end if we want to not have it there in case of an empty body supplied. |
@honzamelena @escapedcat How soon will you fix it? |
@dangreen happy for a PR if you find time and motivation |
@honzamelena would you have time to look at the PR as well? lgtm |
@escapedcat yes, added a comment on the pull request. LGTM |
Published in v16.0.3. Please give it a try and close this issue if it works, thanks |
Expected Behavior
Empty longer description.
Current Behavior
"longer description" is always "-"
Affected packages
Possible Solution
restore this
commitlint/@commitlint/cz-commitlint/src/SectionBody.ts
Line 22 in a038b41
to this
commitlint/@commitlint/cz-commitlint/src/SectionBody.ts
Line 22 in c77381d
Tested
Steps to Reproduce (for bugs)
Your Environment
Issue appeared in @commitlint/[email protected]
The text was updated successfully, but these errors were encountered: