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

One line commit messages should not be rejected #55

Closed
johnboyes opened this issue Jul 28, 2020 · 6 comments · Fixed by #56
Closed

One line commit messages should not be rejected #55

johnboyes opened this issue Jul 28, 2020 · 6 comments · Fixed by #56

Comments

@johnboyes
Copy link

One line commit messages are currently rejected with the message:

Expected at least three lines (subject, empty, body), but got: 1

Chris Beams's guidelines say that one line messages are just fine, however:

not every commit requires both a subject and a body. Sometimes a single line is fine, especially when the change is so simple that no further context is necessary.

@mristin
Copy link
Owner

mristin commented Jul 28, 2020

Hi @johnboyes ,
Thanks for pointing that out! I'll add an additional input (allow-one-liner).

So far, enforcing a body proved to provoke people to write more informative messages, so I didn't even think about allowing one-liners.

@johnboyes
Copy link
Author

Sounds good, thanks @mristin. I'd propose allowing one liners as the default (as the guidelines say they are allowed), and adding a flag to optionally disallow them?

@mristin
Copy link
Owner

mristin commented Jul 31, 2020

@johnboyes I added the feature and pushed the minor version to 2.1.0.

I'd propose allowing one liners as the default (as the guidelines say they are allowed), and adding a flag to optionally disallow them?

The action is already used in quite a few pipelines, so I left it as an optional flag (we actually want to disallow one-liners in those projects).

@johnboyes
Copy link
Author

No problem, @mristin, and thanks for the quick turnaround 👍

Once you have published the 2.1.0 release I'll give it a whirl 😎

@mristin
Copy link
Owner

mristin commented Aug 1, 2020

@johnboyes the release should be up now.

@johnboyes
Copy link
Author

Thanks @mristin, have updated my client repo to use it and have tested it - all working 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

Successfully merging a pull request may close this issue.

2 participants