This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Add commitizen script to package.json #12730
Milestone
Comments
Quick update, now you use config.commitizen.path in package.json. |
This only work for people who commit via command line, what happens if you use SourceTree for example? |
You have to do the same thing you have to do now... Code it manually. This is only useful for people who will run the command. But I don't see that as a drawback........... |
Yes, commitizen is completely opt in. There will still need to be server side validation hooks to verify that people are following the convention. This simply makes it easier for people to commit to the angular project without needing to worry if they followed the commit message convention. |
Closed by a179757 |
benoror
added a commit
to panaxit/panaxjs
that referenced
this issue
Jan 14, 2016
benoror
added a commit
to panaxit/panaxui-nodejs
that referenced
this issue
Jan 14, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One barrier to contributing is getting the commit message conventions right the first time. I don't expect I need to justify that this is a challenge and would be nice to make easier.
Enter commitizen by @jimthedev. Long story short:
commitizen
andcz-conventional-changelog
todevDependencies
czConfig
topackage.json
to tellcommitizen
to use thecz-conventional-changelog
:commit
npm script that utilizes thegit-cz
binary installed fromcommitizen
:Then, just update documentation to tell people to run
npm run commit
after they've staged the changes they want to commit. They will be greeted by the beautiful step-by-step wizard to fill in to create their perfectly formatted commit message:A few comments to address some possible concerns:
Q: What if I don't want to use some weird wizard? I want to have total control over my commit message!
A: You don't have to use it. Everything will work just fine using the regular git commit flow you're used to.
Q: I use a GUI like SourceTree. What if I don't want to do this?
A: See answer above.
I've been using commitizen for a while at work (though I use the cz-jira-smart-commit plugin) and it's be really great. I added it to angular-formly and so far it's been quite helpful. I think that people would find the barrier to contributing lowered even a little bit with something like this.
As a side-note, you could take this a step further and integrate something like ghooks by @gtramontina to ensure that people don't attempt to commit with a message that doesn't follow the conventions. I added this to angular-formly too: config, script. But that's probably another story...
Anyway, I was just thinking of ways to lower the barrier to contributing. Hope this sparks ideas at least :-)
The text was updated successfully, but these errors were encountered: