https://github.com/chemaclass/conventional-commits
A prepare-commit-msg git hook for conventional commits.
https://github.com/chemaclass/conventional-commits
conventional-commits git-hooks
Last synced: 10 months ago
JSON representation
A prepare-commit-msg git hook for conventional commits.
- Host: GitHub
- URL: https://github.com/chemaclass/conventional-commits
- Owner: Chemaclass
- Created: 2023-09-03T17:24:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T14:48:57.000Z (about 2 years ago)
- Last Synced: 2025-04-11T02:56:25.801Z (10 months ago)
- Topics: conventional-commits, git-hooks
- Language: Shell
- Homepage: https://bashunit.typeddevs.com/examples
- Size: 33.2 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Conventional commits
A specification for adding human and machine-readable meaning to commit messages.
Read the docs: https://www.conventionalcommits.org/
## Git to the rescue!
### Why git hooks?
Git hooks are scripts or custom executables that Git allows you to run at specific points during the version control process. These hooks enable you to customize and automate various aspects of your Git workflow.
This repository is focused on the **prepare-commit-msg** client-side hook:
- This hook is invoked before the commit message editor is displayed. You can use this to modify the commit message programmatically.
### 🏗️ Installation
Creates symlink from the actual hook to point to the bash script.
```bash
make init-hooks
# Or
./git-hooks/init.sh
```
### 💻 Development
Make sure you've installed the [bash testing library](https://github.com/Chemaclass/bashunit).
```bash
./install-dependencies.sh
```
#### Automated tests
I included several unit tests to verify the expected behaviour of the hook logic.
```bash
make tests
# or
TEST=true bin/bashunit tests/*_test.sh
```