digitalroute / cz-conventional-changelog-for-jira

A commitizen adapter for the angular preset of https://github.com/conventional-changelog/conventional-changelog
MIT License
65 stars 63 forks source link

commitlint support #81

Open kSzajo opened 1 year ago

kSzajo commented 1 year ago

I would like to use commitizen with cz-conventional-changelog-for-jira and also set it up with commitlint

Having installed git-cz and following config in ~/.czrc

{ "path": "@digitalroute/cz-conventional-changelog-for-jira", "jiraPrefix": "ABC", "skipScope": false }

I tried to run commitlint to verify recent commit using npx commitlint -e and following commitlint.config.js

module.exports = {extends: ['@digitalroute/cz-conventional-changelog-for-jira']};

and encountered error:

✖   Please add rules to your `commitlint.config.js`
    - Getting started guide: https://commitlint.js.org/#/?id=getting-started
    - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/index.js [empty-rules]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

As my project is not node oriented, I would like to keep node dependencies out of my repository.

Is there any option I could run lint using rules from @digitalroute/cz-conventional-changelog-for-jira ?

Buttars commented 1 year ago

The fail is likely because the @commitlint/config-conventional standard expects all lowercase in the commit message but @digitalroute/cz-conventional-changelog-for-jira adds the ticket numbers as capitals.