HotSprings-GmbH / data-science-project-template

The HSG Data Science Project Template is a cookiecutter template to configure data science project repositories.
Apache License 2.0
5 stars 4 forks source link

check_commit_msgs.sh has no effect #29

Closed FabianScheidt closed 1 month ago

FabianScheidt commented 6 months ago

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.

Originally posted by @FabianScheidt in https://github.com/HotSprings-GmbH/data-science-project-template/issues/14#issuecomment-1910796503

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 2.2.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: