Do not work for sub folders
I have husky + this in the package file in a sub folder "ui", not in root of the repo. And it fails at the last step:
JIRA prepare commit msg > Error: Unable to read the file ".git/COMMIT_EDITMSG".
What is the issue? You should already know the git root from before? Not always assume that you are located in the root path.
To verify I changed this line quickly and then it works all the way:
const messageFilePath = "../" + getMsgFilePath();
I have the same issue. My .git folder is tree levels higher than my package.json.
Ik works if I change this line like @andsan
const messageFilePath = "../../../" + getMsgFilePath();
@Simsteve7 What version do you use? How many git repos/submodules do you have in the folder?
I'm also experiencing this. package.json placed 3 levels down from the git project root.
jira-prepare-commit-msg 1.6.0 husky 4.3.0
Also experiencing this issue when using lerna - 3 levels down.