You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Currin edited this page Apr 14, 2021
·
3 revisions
This page is out of date. This project was done initially with a Bash script for proof of concept, then done as a VS Code extension, then a proof of concept was done to use the code in this project without VS Code through the CLI
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).