-
Notifications
You must be signed in to change notification settings - Fork 220
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
Allow skipping pre-push on certain branches #354
Comments
Hey @Brcrwilliams thank you for the issue! I hope to get to it as soon as possible and put it in a next release. 2 weeks at most. Don't hesitate to ping me :) |
Hey! I've prepared a PR with the feature you described. Please, take a look if you can (you can also test it if you want). I am going to merge the PR tomorrow and maybe release it with a 1.2.2 version this week. I hope, everything works just as you expected :) |
Hey! Check out v1.2.2 version. The feature must be there :) |
This is great @mrexox 🙏 Thank you! |
Summary
I work for GitLab. We have a rather elaborate pre-push configuration for lefthook, and we install lefthook automatically via the GitLab Development Kit.
Something we have noticed as of late is that community contributors are confused by lefthook running (and often failing)
when they try to sync their forks with the upstream repository (meaning, they rebase master on upstream and then push to remote master on their fork). I would like to be able to add a configuration to
pre-push
hooks so that they can be skipped when on a certain branch (master
in this case).Value
Since we install Lefthook automatically, contributors aren't very aware of what it is when they first encounter it. They may not realize that it is a git hook, or that it can be bypassed using
--no-verify
. Being able to skip lefthook on master would get rid of a lot of friction for these people.Behavior and configuration changes
I'd like to add a top-level configuration option onto
pre-push
that can be given a branch or ref, and will cause lefthook to skip all commands when on that ref.The text was updated successfully, but these errors were encountered: