git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

Usage with other types of custom hooks

Open Alexnortung opened this issue 2 years ago • 5 comments

First off I want to say that I really like this project!

I know the name of the project is pre-commit-hooks, however I would like to be able to install other types of hooks for our workflow in our team. I would hope that this project would be able to help install these hooks in a nice and declarative manner.

I did take a quick look at the source code, but I am not sure where to begin if I should contribute this kind of feature.

Alexnortung avatar Mar 16 '23 15:03 Alexnortung

To clarify: by other hooks i mean post-commit hooks, pre-merge-commit, etc.

For context, our team are developing with Strapi and are using source controlled files to sync our development and production configurations. We are currently exporting our changed configs with a pre-commit hook, but this raises problems when merging, since the export function will now override what was in the merge. So we would need to use a git pre-merge hook to import what is in the source control.

Alexnortung avatar Mar 17 '23 08:03 Alexnortung

That's supported, maybe we should rename the project to git-hooks.nix

domenkozar avatar Mar 19 '24 07:03 domenkozar

Is it already supported in this project? How can it be used? Or do you mean it can be supported by this project? :)

Alexnortung avatar Mar 20 '24 09:03 Alexnortung

See https://devenv.sh/reference/options/#pre-commitdefault_stages

domenkozar avatar Mar 20 '24 10:03 domenkozar

Thanks a lot, this solved my issue :)

Alexnortung avatar Mar 20 '24 11:03 Alexnortung