Skip to content

Valid commit message subject is rejected #438

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

Closed
1 of 4 tasks
xmlking opened this issue Sep 10, 2018 · 4 comments · Fixed by #451
Closed
1 of 4 tasks

Valid commit message subject is rejected #438

xmlking opened this issue Sep 10, 2018 · 4 comments · Fixed by #451
Labels

Comments

@xmlking
Copy link

xmlking commented Sep 10, 2018

Expected Behavior

Subject starts with 1.0.1 should be considered valid

Current Behavior

printf "chore(release): 1.0.1 [skip ci]\n\n## 1.0.1 (2018-09-09)\n\n\n### Bug Fixes\n\n* build: now updating version (2d913ea)\n\n\n\n" | npx commitlint

This give error
Also reported here:
semantic-release/semantic-release#928 (comment)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

https://github.com/xmlking/ngx-starter-kit/blob/master/package.json

commitlint.config.js ```js ```

Context

Your Environment

Executable Version
commitlint --version VERSION
git --version VERSION
node --version VERSION
@byCedric
Copy link
Member

byCedric commented Sep 10, 2018

So basically you are saying that @commitlint/config-conventional shouldn't enforce any subject casing, because it simply isn't in the spec right? Got the same issue using:

$ printf "chore(release): 1.0.1 [skip ci]\n\n## [1.0.1](https://github.com/xmlking/ngx-starter-kit/compare/v1.0.0...v1.0.1) (2018-09-09)\n\n\n### Bug Fixes\n\n* **build:** now updating version ([2d913ea](https://github.com/xmlking/ngx-s
tarter-kit/commit/2d913ea))\n\n\n\n" | npx commitlint -x '@commitlint/config-conventional'

I'm not sure if this was intentional, but it looks like the sentence-case setting of the subject-case rule is failing with numbers/semantic versioning.

Until this is resolved, you can temporarily work around this by adjusting the subject-sentence rule.

{
  "commitlint": {
    "extends": ["@commitlint/config-conventional"],
    "rules": {
      "subject-case": [2, "never", ["start-case", "pascal-case", "upper-case"]]
    }
  }
}

@marionebl marionebl added the bug label Sep 10, 2018
@marionebl
Copy link
Contributor

@byCedric is right, we should ignore characters not matching [a-zA-Z] from the case rules in general.

@xmlking
Copy link
Author

xmlking commented Oct 3, 2018

any update in this issue ?
thanks

@byCedric
Copy link
Member

byCedric commented Oct 3, 2018

@xmlking Sorry, I had a bit too much work on my hands these past weeks. Right now, I'm writing a fix for this. Please stick with us here! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants