Skip to content
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

Usage with other types of custom hooks #260

Open
Alexnortung opened this issue Mar 16, 2023 · 5 comments
Open

Usage with other types of custom hooks #260

Alexnortung opened this issue Mar 16, 2023 · 5 comments

Comments

@Alexnortung
Copy link

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
Copy link
Author

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.

@domenkozar
Copy link
Member

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

@Alexnortung
Copy link
Author

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

@domenkozar
Copy link
Member

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

@Alexnortung
Copy link
Author

Thanks a lot, this solved my issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants