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(commit): trim the text before matching with commit parser #573

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

orhun
Copy link
Owner

@orhun orhun commented Mar 23, 2024

Description

This PR changes the commit parser behavior to always trim the text (commit message, body, etc.) before matching it with a regex.

This means that you will be able to use $ in the regex for matching until the end.

Motivation and Context

closes #554

How Has This Been Tested?

Locally / tests / fixtures.

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 force-pushed the fix/trim_text_before_regex branch from 7b7f9f7 to 9f943a1 Compare March 23, 2024 15:06
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.07%. Comparing base (9eb3d65) to head (9f943a1).

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   41.07%   41.07%           
=======================================
  Files          15       15           
  Lines        1069     1069           
=======================================
  Hits          439      439           
  Misses        630      630           
Flag Coverage Δ
unit-tests 41.07% <100.00%> (ø)

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.

@orhun orhun merged commit 4971b23 into main Mar 24, 2024
44 checks passed
@orhun orhun deleted the fix/trim_text_before_regex branch March 24, 2024 14:30
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.

Valid complex regex doesn't match valid commit message
2 participants