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

Auto-update on commit #73

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

flugg
Copy link
Contributor

@flugg flugg commented Apr 4, 2022

Hello, great project @toplenboren! Just migrated from Husky myself and have to say this project works in a much more elegant fashion DX-wise.

Inspired by #34 I've added built-in support for auto-updating the hooks on commit. It's tested this with both npm and Yarn. In addition, it should not break anything for people who already added the update script to the pre-commit hook, but in these cases it will run the simple-git-hooks command twice.

This all works by running a simple-git-hooks command instead of the user-specified pre-commit command. This command uses both a silent option so the user's terminal isn't bloated with messages when updating the hooks, and an auto option which executes the configured pre-commit.

Would love to hear what you think!

Edit: It should probably be mentioned in the release notes/upgrade guide that you need to run the simple-git-hooks once with the new version before the automation kicks in.

@toplenboren
Copy link
Owner

Hi, please check the tests :) it seems, that something is off

Let me know If I can be of help

@JounQin
Copy link
Contributor

JounQin commented Aug 12, 2022

I think a custom prepare/postinstall script is just the solution, no need to contaminate the current codes.

Of course, a new silent option is great to me, at least personally.

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

Successfully merging this pull request may close these issues.

3 participants