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

fix: Handle comments by stripping #87

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

nikolaik
Copy link
Contributor

@nikolaik nikolaik commented Jan 10, 2024

This is an attempt at solving failed validation of commit texts with trailing comment lines which are usually added when writing the commit message in an editor, f.ex:

EDITOR=vim git commit -a

which on some systems gives you a templated commit message similar to this:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch nikolaik/editor-comments
# Your branch is up to date with 'origin/nikolaik/editor-comments'.
#
# Changes to be committed:
#   new file:   yolo

Reported in #80

@thekaveman thekaveman linked an issue Jan 12, 2024 that may be closed by this pull request
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nikolaik!

I added one extra check to your tests to ensure the actual commit message is unaltered. Otherwise this is great 👍

@thekaveman thekaveman merged commit 07fd005 into compilerla:main Jan 12, 2024
6 checks passed
@nikolaik nikolaik deleted the nikolaik/editor-comments branch January 12, 2024 19:18
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 this pull request may close these issues.

Clarification on recent multi-line change
2 participants