-
Notifications
You must be signed in to change notification settings - Fork 43
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
[feat] Add a new option to skip enabling on CI #99
Comments
Hi! I think this is going to be implemented once #96 make it to |
#96 is a bit different for skipping on committing, while this issue aims skipping installation at the beginning. I'd like to work on a PR soon. |
@toplenboren I'd like to reuse |
@JounQin Many CI environments normally set the |
@peschee I think that would be a BREAKING CHANGE? |
Yes, probably. But are there instances where you'd want the hooks to be installed in a CI environment? |
It's not about me personally, it's a behavior change which is a BREAKING CHANGE. |
Yes, I understand. Breaking changes can happen though, so I'd be inclined to still vote for handling |
I'm fine with BREAKING CHANGE or major version personally, let's wait for @toplenboren to confirm. |
Why do we need any git hooks to be set in Maybe we can just add the guard to |
Husky uses a custom env var for this: https://typicode.github.io/husky/how-to.html#ci-server-and-docker Maybe it is easier to off-load the responsibility of skipping to the user all together. Using something like is-ci is pretty straightforward… |
Checking commit message on CI for example.
I'd prefer to check
|
By the way, what is your usecase @JounQin? |
In my company, we have components which checks previous commit message on CI. While in some other components, we don't want to enable git hooks because we could commit automatically with other tools. |
Thank you for clarification! Why simply using |
That's the point, we don't want the hooks to be installed and logs |
Let's add
This way we will:
What do you think, @JounQin. Will this cover your usecases? |
Do you want to add a dependency like |
That‘s how I meant it: using |
Checking |
It seems we're talking about two different things… The way I meant it is what is in the husky docs. They DO NOT include the My point was: this library is probably better off not including an additional dependency. |
Oh, yes, I also think we should not check about CI on this lib's side. Do you have the consensus here? |
I honestly really like this idea:
Let's just check |
OK, I'm personally fine with this strategy.
Isn't it a BREAKING CHANGE for not installing on CI by default? |
Well.. technically yes.. :( I think we can do a major release, no problem We can also split: first add the ability to configure INSTALL_SIMPLE_GIT_HOOKS and then add CI processing and update major |
I'll work on it soon. |
As title
The text was updated successfully, but these errors were encountered: