-
Notifications
You must be signed in to change notification settings - Fork 8
Tool to prompt user for commit #9
Comments
Thank you for submitting this First, this convention is not invented by me. Angular project first adapted it and it is used by a lot of projects now. You don't have to remember the rule but you can choose weather to use it in your project. Second, you don't have to follow this rule to use this module. This module tries to parse your commits based on this rule but if certain bits are missing, it will be null and pass it to downstream. Last, you can use a pre commit hook in your project along with this one. I won't include a precook module in this one because of separation of concerns. I'm not sure if there's an existing one for angular but if not, anybody can write one. Sent from my iPhone
|
Thanks. I think I understand. Appreciate it. |
I think https://github.com/jzaefferer/commitplease might do |
Thanks. Looks like a commit hook. Angular already has one here: https://github.com/angular/angular.js/blob/master/validate-commit-msg.js I guess my point is that I'd like something that the user can run that explicitly asks for the fields rather than using true/false. |
So you want something like this:
|
Yep! And I know how to accomplish this using Inquirer but figured there might be more conventions than the one used by the Angular team (you mentioned the JQuery example) and a good tool would look to the repo for a config file to determine these questions. |
I guess if user can configure the rules that would be great |
👍 Thanks. This inspires me |
Great! Thanks for your work on conventional commit. It looks great. Excited for the eventual merge. |
If you wanna do it, go ahead and let me know. If not, I'll eventually do it. Thanks for this idea. |
@stevemao I have some alpha code for this. It works pretty well. Will post soon. |
@stevemao Released Commitizen here: http://commitizen.github.io/cz-cli/ Would appreciate any feedback. |
Will have a look when I have time. Thanks @jimthedev |
Hi Steve,
Wasn't sure where to put this or how I could reach out to you other than Github so please close as needed.
I think the conventional commit format is great but IMO there is a missing piece right now for people who just want to make commits to a repo without remembering the exact formatting spec that a repo author prefers. Sometimes I want to commit to a repo and there is a specific format that the repo author prefers. This is great but ideally I, as the contributor, would prefer to be prompted for the required commit message fields rather than having to remember the convention of every repo. It also isn't helpful for ides or scm tools that might want to change their behavior based on a repo's preferred commit format.
Git pre-commit hooks are great for stopping me, the one-off contributor, from doing harm, but from a tooling perspective they leave something to be desired because they don't actively prompt me for the require commit fields using something like inquirer.
So I wanted to get your pulse on this so see if you think it would be possible or even preferable to have some sort of config file that repo authors could include in the repo that defines certain norms when it comes to commit messages.
Since you're writing the updated parser and writer for changelog, I figured it was worth checking in. I haven't worked out the details yet but my guess is that it would be something like .commitformat or .commitconvention
Any overlap between this and what you're working on?
Thoughts.
The text was updated successfully, but these errors were encountered: