Commitlint falls back to the last commit message, which is stored in _.git/COMMITEDITMSG. This PR has updated the script to touch the file. In CI systems, this will create an empty file, which is always a valid commit message.
The proper fix is to set pass_filenames: true in the hook setup and revert the shell script.
The change to _check_commitmsgs.sh actually voids its functionality. With v8.0.0, the commitlint hook was updated to no longer pass filenames to the executable, so the file we're preparing with the commit message is actually not passed to the script: https://github.com/alessandrojcm/commitlint-pre-commit-hook/commit/fef793a347be7e7e3efb2edeb0f5970c7e8d0ce0
Commitlint falls back to the last commit message, which is stored in _.git/COMMITEDITMSG. This PR has updated the script to touch the file. In CI systems, this will create an empty file, which is always a valid commit message.
The proper fix is to set
pass_filenames: true
in the hook setup and revert the shell script.