Skip to content

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Feb 1, 2020

In the previous pre-commit PR, I add the wrong stages argument into the .pre-commit-hooks.yaml. It should be defined on the user side. I'll also update the document.

BTW, I notice it didn't bump the version and release on the previous PR.

@woile woile merged commit 3485277 into commitizen-tools:master Feb 1, 2020
@Lee-W Lee-W deleted the fix-pre-commit-hook branch February 20, 2020 09:41
@Kurt-von-Laven
Copy link
Contributor

Kurt-von-Laven commented May 16, 2022

@Lee-W, I believe it was correct before. Hooks can confine themselves to particular stages when they know they would only be useful in those stages. Maybe one could argue that there is value in adding prepare-commit-msg to the list of stages in which one could run the hook, but unless someone comes forward with a good reason to do that, I would wager even that case is more likely to be a misconfiguration. Confining the hook precludes what I suspect to be a far more likely misconfiguration, where the user accidentally runs the hook pre-commit, for example. I have opened #514 proposing to revert this revert, so please let me know if I am missing something.

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