-
Notifications
You must be signed in to change notification settings - Fork 13
Implementation
michaelcurrin edited this page Jun 9, 2020
·
3 revisions
- A Python script which accepts to stdin and writes out to stdout
- Input and output file can be added later or handled with pipes
- Tests - from spec
- Sample and summary of scenarios
- Have functions and maybe a class to or function to bind them together. There is a decision tree of nesting/reusing of logic and each piece can work on its own in a test
- Installable.
- Maybe a bash wrapper on the text handling PY script.
Where to install? Instead of adding the git hook to each project, the instructions could be to set it up globally and symlink to it.
e.g. ~/.local/auto-commit-msg/
That could be a repo to make it easy to update.
Or follow the pattern of https://github.com/ohmyzsh/ohmyzsh or similar to make an installable script which can be updated with an update command. And one could run a bash script in the repo from anywhere (in ~/bin or ~/.local/bin and added to PATH).
Then the git hook in each project could be just a few lines and call the global script as an executable, or with a symlink (more fragile and specific to path).