Closed TheRatG closed 4 years ago
Not to my knowledge.
We have a task to control the format of a commit message, but nothing to prefix the name of the branch. Git commit message
It may be interesting to add an option to this task to add this feature. Would you like to make a pull request?
Changing the commit message from grumphp won't be easy. Especially inside the vagrant specific hook. You need to alter a temporary file for that. Therefor I'dd suggest to keep GrumPHP for validating the commit message.
It's a better option to use the prepare-commit-msg
git hook to change the commit message. This is not something that is supported by GrumPHP.
More info about how that hook works: https://medium.com/@jake.henningsgaard/exploring-git-customizing-commit-messages-1a4ecb4dca69
Changing the commit message from grumphp won't be easy. Especially inside the vagrant specific hook. You need to alter a temporary file for that. Therefor I'dd suggest to keep GrumPHP for validating the commit message.
It's a better option to use the
prepare-commit-msg
git hook to change the commit message. This is not something that is supported by GrumPHP. More info about how that hook works: https://medium.com/@jake.henningsgaard/exploring-git-customizing-commit-messages-1a4ecb4dca69
Thanks for answer
Is it possible to modify commit message? For example automatically prepend git commit with a branch name.