-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
When using this hook my commit message content which is provided to this hook is in format
commit msg
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Thu Oct 31 15:54:52 2024 +0100
#
# On branch mt/TEST-1234
So it always returns here as pattern (branch name) is in content.
I'm wondering a bit about this change, because the whole content is now checked for pattern. Shouldn't it be only the lines not starting with #?
My setup
repos:
- repo: https://github.com/milin/giticket
rev: v1.4
hooks:
- id: giticket
args: [
"--mode=regex_match",
'--regex="[A-Z]+-[0-9]{4,8}"',
"--format={commit_msg}
Issue: {ticket}
",
]
steps to reproduce:
git checkout -b mt/TEST-1234
git commit --amend -S
...
giticket.................................................................Passed
...
git log -1
# message not updated
git version: 2.43.0
OS: Ubuntu 24.04
What am I doing wrong?
Metadata
Metadata
Assignees
Labels
No labels