Replies: 3 comments 4 replies
-
I think I can add a flag |
Beta Was this translation helpful? Give feedback.
-
@mrexox The That said, I am okay with closing this discussion if you are as well. |
Beta Was this translation helpful? Give feedback.
-
Could this be added to the main .lefthook config file ? everytime i execute Created feature-request |
Beta Was this translation helpful? Give feedback.
-
TL;DR Is it possible to run a
lefthook
hook without the.git/hooks
directory being modified?We've recently switched from using
git hooks
combined withlint-staged
to solely usinglefthook
in our monorepo. This change was implemented to streamline managing and executing multiple linters simultaneously during our CI process. Which by usinglefthook
has made it very easy and clean to do! 🙌We then encountered a problem where our CI runners were inadvertently syncing the
git hooks
that affected the auto-commit linter fixes, leading to failures.To address this, we configured
lefthook
to skip all hooks in the CI environment except for the specific ones needed, using askip
option in therun
settings.Despite solving the issue, we are curious if there is a simpler solution. Specifically, we want to know if there's a way selectively execute certain hooks in a CI environment without triggering the entire install script.
lefthook/internal/lefthook/install.go
Lines 111 to 191 in 1d100c6
Beta Was this translation helpful? Give feedback.
All reactions