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(parser): allow matching empty commit body #605

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

orhun
Copy link
Owner

@orhun orhun commented Apr 11, 2024

Description

This PR updates the commit parsing to matching empty commit body.

Makes it possible to skip commits with empty body:

[git]
commit_parsers = [
  { body = "$^", skip = true },
]

Motivation and Context

closes #604

How Has This Been Tested?

Locally.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@orhun orhun mentioned this pull request Apr 11, 2024
1 task
@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 41.41%. Comparing base (adc5c5b) to head (f98278c).
Report is 1 commits behind head on main.

Files Patch % Lines
git-cliff-core/src/commit.rs 83.34% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #605      +/-   ##
==========================================
+ Coverage   41.27%   41.41%   +0.14%     
==========================================
  Files          15       15              
  Lines        1071     1070       -1     
==========================================
+ Hits          442      443       +1     
+ Misses        629      627       -2     
Flag Coverage Δ
unit-tests 41.41% <83.34%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bbbenja
Copy link

bbbenja commented Apr 12, 2024

Just tested on my project and it works great, thanks a lot.

@orhun
Copy link
Owner Author

orhun commented Apr 12, 2024

Thanks for checking it out!

@orhun orhun merged commit 1d1b3b8 into main Apr 12, 2024
43 of 44 checks passed
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.

Filter commits without body
3 participants