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

Commit is not aborted for an empty commit message #26

Open
hofbi opened this issue Jan 31, 2023 · 2 comments
Open

Commit is not aborted for an empty commit message #26

hofbi opened this issue Jan 31, 2023 · 2 comments

Comments

@hofbi
Copy link

hofbi commented Jan 31, 2023

I observed this potential unwanted behavior. When I commit and then close the editor without typing a commit message, then the commit is aborted due to an empty commit message. However, with this hook, a commit with only the Jira ID is created.

In my opinion, the correct behavor would be to abort here as well. In https://github.com/milin/giticket/blob/master/giticket/giticket.py#L25, I can see that you check if there is already a Jira ID. I would suggest to add an additional step that checks if the commit message it empty.

@dedalusMohantyMa
Copy link

I just wanted to write the same thing.
This plugin works fine for everything, but this is a bit irritating, as I would expect an empty commit message should not trigger a commit, as git also behaves this way.

@milind-shakya-sp
Copy link
Collaborator

Sorry this took a bit long to respond.

I'll add this to the backlog but pls feel free to open a PR as well.

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

3 participants