Conversation
56505f0 to
756edb1
Compare
dzenanz
left a comment
There was a problem hiding this comment.
Mostly looks good on a glance.
756edb1 to
e4f0eee
Compare
e4f0eee to
fdda390
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the commit message hook from bash to Python to improve readability and maintainability.
- Introduces a new Python script for the commit message hook in Utilities/Hooks/kw-commit-msg.py.
- Removes the old bash-based hook in Utilities/Hooks/kw-commit-msg.
- Updates the pre-commit configuration to reference the new Python script.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Utilities/Hooks/kw-commit-msg.py | New Python implementation for commit message validation |
| Utilities/Hooks/kw-commit-msg | Removal of the legacy bash hook |
| .pre-commit-config.yaml | Updated hook entry to point to the Python script |
The logic for testing and implementing commit message testing is much more streamlined and easier to maintain in the python implementation. With the use of pre-commit hooks, the availaility of python is already implied.
fdda390 to
46290e0
Compare
|
Should we move these hooks to a separate repo to be reused by projects? |
I think they are easy enough to copy and "vimdiff" compare that the overhead of a separate project is not worth it. .... that's just my 2 cent opinion :). |
|
Not sure if we were aware of this: |
|
Re #5434 (comment) seems like the SO question was not very popular, but digging more into this I found this: which is supported by I may have a better look if we agree that we want to adopt this. |
|
gitlint sounds promising |
|
Had a closer look and it seems like it is no longer maintained, unfortunately (last commit was 2 years ago). |
Move the pre-commit hooks from bash to python.
A few advantages of python:
PR Checklist