-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support hooks on git events triggered by submodules #1450
Comments
jclaveau
changed the title
Support hooks on submodules git events
Support hooks on git events triggered by submodules
May 24, 2024
I am using version v9, how do I write the./.husky/link-submodules-hooks.sh file |
Just create it and copy the following content as written above
NB: Windows doesn't support symlinks for what I know, I personnaly use Linux Then add the prepare line to your package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
I see two use cases for submodules with Husky
Here I focus only on the first case
Context
Steps
hooksPath
of the root repo so Husky can't handle submodules hooks.As a workaround I created the script
.husky/link-submodules-hooks.sh
And run it from my
package.json
:Glad to it, I have folders in my
.husky
directory where i can store my hooks likeThis feature should belong, IMHO, to Husky. Meanwhile, this script may help other Husky users to achieve it!
This use case also answers your message, here #1308 (comment)
Thanks a lot for sharing your work!
The text was updated successfully, but these errors were encountered: