Commitlint: Bug: commit subject-case fails on valid message

Created on 2 Jun 2018  路  6Comments  路  Source: conventional-changelog/commitlint

Hi there :)

A recent release may have broken commit subject parsing for the subject-case rule.

Expected Behavior

With the @commitlint/config-conventional rules:

revert: internalKey recording should be valid

Current Behavior

revert: internalKey recording fails with subject must be camel-case, kebab-case, lower-case, snake-case [subject-case]

Affected packages

  • [x] config-conventional
    I don't know enough about the project to have a good guess where

Steps to Reproduce (for bugs)

  1. example of expected behavior: https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fjs-ipfs/detail/PR-1045/46/pipeline/28#step-202-log-3
  2. example of current behavior: https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fjs-ipfs/detail/PR-1045/47/pipeline/28#step-110-log-6

Context

鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @commitlint/[email protected]
鈹溾攢 @marionebl/[email protected]

Most helpful comment

@coderica here is a example with groovy how to use the commitlint: https://github.com/ipfs/jenkins-libs/blob/master/vars/javascript.groovy#L386-L396

This was written at least a year ago, so not 100% it still works with the latest versions of commitlint, but worked at the time.

All 6 comments

@JonKrone I've been scraping the internet for examples of how to use this package in Jenkins CI. Your issue leads me to believe that may be your project setup. If so, can you share how you got that working?

Hi there @coderica!

Yeah, it looks like the setup we had was using Jenkins, though I was not involved in adding commitlint to their CI step. I believe @VictorB was the one to do so and may be able to answer your questions.

Good luck getting it working!

@coderica here is a example with groovy how to use the commitlint: https://github.com/ipfs/jenkins-libs/blob/master/vars/javascript.groovy#L386-L396

This was written at least a year ago, so not 100% it still works with the latest versions of commitlint, but worked at the time.

Thanks @JonKrone @victorb I appreciate the help!

For the wayward coder looking for a solution to using commitlint in Jenkins CI, here's what ended up working for me:

sh "commitlint --from `git rev-parse node/${script.gitlabTargetBranch}` --to `git rev-parse node/${script.gitlabSourceBranch}`"

Note that the script.gitlab... variables are available via the gitlab-plugin for Jenkins.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xmlking picture xmlking  路  4Comments

topocount picture topocount  路  3Comments

kirillgroshkov picture kirillgroshkov  路  3Comments

yenbekbay picture yenbekbay  路  5Comments

QuentinRoy picture QuentinRoy  路  5Comments