Pre-commit hook to check it matches the commit format
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary
Pre-commit hook to check it matches the commit format
## 💬 Description
A pre commit hook should be introduce which fails locally and the pipeline if commits do not follow the following format:
- commits with the "docs" scope only has changes from the "docs" directory
- commits from the "react" scope only has changes from the "react" directory
- etc
## 💰 Use value
To ensure that our release logs are accurate and ensure that the docs are updated when appropriate to ensure a smooth release.
## Additional info
General thoughts was to add to Husky to loop through each scope and check the relevant folder for "git diff"
Contributor guide
Research direction
Start by reviewing the repository's Husky setup and pipeline configuration, then trace how commit scopes and changed paths can be inspected with git diff. Implement checks for each scope-to-directory rule so both local commits and the pipeline fail on mismatches; done means valid commits pass and invalid scope changes are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100