chore(ci): add lefthook git hooks manager - #37
Merged
Merged
Conversation
Adds lefthook.yml with pre-commit (npm run lint) and commit-msg (type(scope): summary enforcement) hooks. Scripts live under .lefthook/<hook-name>/ per lefthook convention. README documents setup via 'lefthook install'. Config and hook behavior verified: valid messages accepted, invalid rejected, validate passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Lefthook for git hook management to the template.
lefthook.yml— pre-commit (npm run lint) + commit-msg (type(scope): summary).lefthook/commit-msg/commit-msg-lint.sh— validates commit message formatREADME.md— documents setup vialefthook installVerification
lefthook validatepassesSetup
mise use lefthook # or your package manager lefthook installOverride with
git commit --no-verifywhen needed.Greptile Summary
Adds Lefthook-managed pre-commit linting and commit-message validation, with installation guidance in the README. The earlier report that lint failures could be suppressed is disproved: when a present project's lint script exited 23, the configured pre-commit command also exited 23 rather than allowing the commit to proceed.
Confidence Score: 5/5
No blocking failure remains.
The configured lint command propagates failures, and the commit-message validator correctly rejects invalid subjects while accepting documented conventional and merge subjects.
What T-Rex did
Reviews (3): Last reviewed commit: "chore(ci): add lefthook git hooks manage..." | Re-trigger Greptile