Skip to content
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

Can't release because commit does not validate with commitlint #219

Open
satazor opened this issue Nov 19, 2017 · 5 comments
Open

Can't release because commit does not validate with commitlint #219

satazor opened this issue Nov 19, 2017 · 5 comments
Labels

Comments

@satazor
Copy link

satazor commented Nov 19, 2017

Using,

    "@commitlint/cli": "^5.0.0",
    "@commitlint/config-angular": "^5.0.0",

with standard version, fails with:

husky > npm run -s commitmsg (node v8.4.0)

⧗   input: chore(release): 1.0.0
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖   type must be one of [build, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖   found 2 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)

Command failed: git commit CHANGELOG.md package.json package-lock.json -m "chore(release): 1.0.0"
husky > npm run -s precommit (node v8.4.0)

Running tasks for *.js [started]
Running tasks for *.js [skipped]
→ No staged files match *.js
husky > npm run -s commitmsg (node v8.4.0)

⧗   input: chore(release): 1.0.0
✖   subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖   type must be one of [build, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖   found 2 problems, 0 warnings

Perhaps the type and message need to be adjusted?

//cc @marionebl @bcoe

@satazor
Copy link
Author

satazor commented Nov 19, 2017

@marionebl I think that the valid types on @commitlint/config-angular are wrong.

Valid types are: feat:, fix, docs, style, refactor, perf, test and chore. Basically chore is missing and build, ci and revert should not be allowed. See https://github.com/marionebl/commitlint/pull/143

Regarding the subject, according to angular guidelines it must start with a verb. Changing to release %s should do it.

@marionebl
Copy link

marionebl commented Nov 20, 2017

This is caused by commitlint switching to the new Angular (vs. Angular.js) commit conventions with version 5.0.0.

I think we should update standard-version to match the latest conventions.

You can fall back to @commitlint/config-angular@4 until that lands.

@bcoe
Copy link
Member

bcoe commented Nov 21, 2017

@satazor see my comments on #220

I'm not too excited to drop the chore commit type -- personally I'd rather introduce a new commit convention for standard-version that tracks https://conventionalcommits.org/ (which it sounds like is looser than angular's convention now, since it allows you to use arbitrary verbs).

Edit:

Having calmed down from my initial annoyance at the angular spec being made tighter, I'm onboard with making our commits adhere to their new format. At the same time, I would like to set a goal of moving this project towards a @commitlint/conventional-commits format.

@satazor
Copy link
Author

satazor commented Nov 21, 2017

@bcoe I share the same concerns actually. I think that we should really create a more simpler standard because the new one has some new types that are kind of specific to their needs (e.g.: build vs chore, style..) and introduce unnecessary complexity when deciding.

Since commitlint updates their last tag back to 4 this no longer is a emergency and we have time to decide.

@bcoe
Copy link
Member

bcoe commented Nov 28, 2017

@satazor see conversation here, @marionebl has done a great job of outlining some of the work that we'd need to take on to simplify the commit conventions.

@bcoe bcoe added the triaged label Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants