You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is it possible to use the simple-git-hooks as a library/api?
I would like to detect and react to branch changes on a watch mode build script (using esbuild and typechecking).
In case of branch changes, sometimes incremental builds and typechecks do not work reliably, so I would restart those. But for this i need to detect git hooks as an event/callback.
Thx!
The text was updated successfully, but these errors were encountered:
Don't really think how utilising git-hooks might help you.
In a nutshell git hook is simply an .sh script that runs sometime and will fail if returned with non-zero code. I'd have resorted to custom .sh scripts for that cause
In any case, here is some info that might help you:
simple-git-hooks is just a wrapper behind git hooks. simple-git-hooks.js has exportable methods for setting/removing hooks, finding package.json or finding git root. Please check out how the simple-git-hooks.test.js are written, they import these methods form simple-git-hooks file
You might want to opt out of automatically installing git hooks to your system by using SKIP_INSTALL_SIMPLE_GIT_HOOKS=1 environment variable.
Hello
is it possible to use the simple-git-hooks as a library/api?
I would like to detect and react to branch changes on a watch mode build script (using esbuild and typechecking).
In case of branch changes, sometimes incremental builds and typechecks do not work reliably, so I would restart those. But for this i need to detect git hooks as an event/callback.
Thx!
The text was updated successfully, but these errors were encountered: