Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No update of commit message #30

Open
matawed opened this issue Nov 3, 2024 · 1 comment
Open

No update of commit message #30

matawed opened this issue Nov 3, 2024 · 1 comment

Comments

@matawed
Copy link

matawed commented Nov 3, 2024

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?

@matawed matawed changed the title Not working on Ubuntu 24.04 Linux with git version 2.43 No update of commit message Nov 3, 2024
@matawed
Copy link
Author

matawed commented Nov 4, 2024

#31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant