fix: handle commit message starting with # #59
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Handled commit message starting with '#'.
How was the issue fixed?
Comments are removed only on the file as a commit source (--file), as comments are only allowed through the file from git. This fix resolved the issue on GitHub Actions, CLI which uses hash values and direct commit messages.
For the file as a commit source, the linter will still remove the comments, including valid commits starting with '#'. A commit message starting with '#' will be treated as an empty commit. Since a commit starting with '#' does not follow the conventional commit specification, treating it as an empty commit yields the same result. Additionally, we display the full commit message in the input section, therefore the commit message will not be empty in this case.
Furthermore, the README document is updated mentioning not to use the commit messages that start with '#'.
Development Summary
--file
(since the commit message from hash doesn't contain comments). This improves performance.remove_diff_from_commit_message
for removing diff from the commits.Related Issue
Fixes #49
Type of Change
Please mark the appropriate option below to describe the type of change your pull request introduces:
Checklist
Examples:
"fix: Fixed foobar bug"
,"feat(accounts): Added foobar feature"
.README.md
.Additional Notes
[Add any additional notes or context that you think the reviewers should know about.]
By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.