-
-
Notifications
You must be signed in to change notification settings - Fork 198
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(config): fix default regexes and references in docs #7
Conversation
Should I amend my commit(s) to have the end commit message, and keep one / a branch to merge / will you squash and rewrite? generally I just copy from the PR description (minus process-checkmarks and similar), but I'm happy to rewrite to whatever you'd prefer. |
Codecov Report
@@ Coverage Diff @@
## main #7 +/- ##
==========================================
+ Coverage 42.38% 42.72% +0.34%
==========================================
Files 13 13
Lines 597 597
Branches 162 162
==========================================
+ Hits 253 255 +2
+ Misses 254 250 -4
- Partials 90 92 +2
Continue to review full report at Codecov.
|
Hello! Thanks for taking time to submit this, I know something was odd with my regexes 😄
Makes sense.
That's right 👍🏼
I think that's fine. Matching only the type of the commit (e.g.
CI seems to be failing, can you run edit/note:
I can squash the commits, no problem. And I was wondering if we should update the regexes in the other templates as well. ( |
I'd thought cargo did that, but it looks like no - will do.
Yep - I only searched for "feat*" or something, so I just missed them. I'll add them as well. |
Huh. I also realized that you may want to change the version regexes. Currently they're |
They are glob patterns not regex so Other than that everything seems fine to me. Just one thing, I recently pushed b5df656 and the regexes in this commit ( |
I think I'm going to merge this and update the other regexes afterwards. Thanks again! |
Description
Fixes a likely bug in the default message regexes.
Motivation and Context
A regex like
^feat*
will match all of these: https://regex101.com/r/esaUhE/1feat
feature
fea
featttttttttttttttttt
fealty
Likely this was intended to act like
^feat.*
, but as it was working correctly on "feat: add xyz" it must not need to match the whole string, so the trailing "any characters.*
" is unnecessary.In some of these, it may be desirable to add a
\b
on the end to match only whole words, not partial... but likely not all, as e.g. allowing "feat" to match "feature", and "fix" to match "fixes" is probably a good thing. I haven't done that here mostly because that seems like a lot more of a design choice than a bug :)How Has This Been Tested?
Prior to changing the regex in integration_tests.rs, adding this:
fails because the "final: invalid commit" is included in the output:
Using
^fix
(as in this PR) correctly filters it out.Types of changes
Checklist:
rustup default nightly
, all pass)