-
Notifications
You must be signed in to change notification settings - Fork 16
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
Passing git hook args to the scripts #15
Comments
Hey @Apemb! Yeah definitely this project needs to support the
I just update the project so you can use Under I published a preview version Thanks for the contribution! |
You Sir are awesome ! I upgraded my version and all seems to work perfectly with If possible I would suggest to make the mix tasks receive the arguments too. Creating a mix task is quite easy, easier than create a bash script for me at least. Anyway thanks again, if I can help you in anyway please tell me |
Sure, what about adding a By default, having a list of strings will run the plain commands, so we need to differentiate when we can send the hook arguments and when we cannot. This will be really easy to implement, I'll have a new version by the end of today so you can give it a try :) |
So juste for me to understand, that would mean three modes :
Wouldn't it be better to have something like That would mean :
What do you think ? It is not a big change, I am not entirely sure it is worth the time. It was more to see if the interface could be standardized between the three modes, all of them being a tuple, with syntactic sugar for the default The possibility to use a mix task is anyways very nice :) With additional modules like (for example right now my script file contains one line:
which could be put directly into a |
I think it's better to standarize the way the actions are configured. This is, having I liked the cleaning less of just declaring a list of strings, but clearly it's not flexible enough. What about having the git hook args filtered via opts? It would look something like this:
|
As of using only strings as command, allowing just strings that ends up being |
Hey @Apemb I just updated the project with the There is another pre-release on hex named |
So I tested your new improvements, and it all works great 🎉 ! (tested with I have a small suggestion. When the commands run for exemple this one
Which is not as helpful as having the whole command written ( Edit : |
Wonderful :) Thanks for the other feedback btw, I'll fix it by the weekend and release the new version. I'll open new tickets for them and close this one. Thanks again @Apemb |
This project is very nice, thank you for your time and effort :-)
I was considering using it in my current project, but one of our usecase is to append commit message with the branch ticket number (example: my branch is
feature/23_awesome_feature
I want my commit to be named#23 Nice commit message
) and one of the way to achieve that is to use thecommit-msg
git hook.This hook receives one argument, the temporary commit message file path, and expects the script to modify the file and return 0 (success code) or anything else (error code).
Except if I am mistaken, but here the scripts do not receive any args. Is there any reason for that ? I would gladly do a pull request to add that feature if you want :) .
The text was updated successfully, but these errors were encountered: