Recognize variants of "thanks clippy"#42
Merged
Sebastian Thiel (Byron) merged 1 commit intoApr 13, 2025
Merged
Conversation
bce26b9 to
9eb2ad1
Compare
The commit message title (or title prefix) "thanks clippy" was recognized, but case variants such as "Thanks clippy" were not. Less importantly, the plausible "thanks, clippy" variant (and its case variants) were also not recognized. This downcases the title before checking for "thanks clippy" as a prefix, and it adds a check for the prefix "thanks, clippy". Fixes #39
9eb2ad1 to
ca7d486
Compare
Sebastian Thiel (Byron)
approved these changes
Apr 13, 2025
Member
Sebastian Thiel (Byron)
left a comment
There was a problem hiding this comment.
Thanks a lot! I can imagine that this alone will catch additional cases in the real world, even though I don't even know if there are other projects doing the same.
Thus far, I thought it's only me having a need for it.
Member
Author
Well, I've been writing a capitalized |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #39
The commit message title (or title prefix) "thanks clippy" was recognized, but case variants such as "Thanks clippy" were not. Less importantly, the plausible "thanks, clippy" variant (and its case variants) were also not recognized.
This downcases the title before checking for "thanks clippy" as a prefix, and it adds a check for the prefix "thanks, clippy".
Currently this fails on CI due to new clippy errors, which are not specific to this PR and which #41 fixes. If #41 is merged then this could be rebased and I expect it would pass CI.
Entirely aside from that, I would guess that this may not yet ready to be merged, since it has no tests. The change is fairly simple, but it is plausible that there could be a bug. I didn't add a test yet, since it looks like this only has integration tests, and I'm not sure if or how a snapshot should be made with this, or if a narrower test should be added, or if the existing code in this area should be refactored to make it easier to test. Alternatively, if this is considered acceptable for merging without a test, then waiting to inquire about this might've incurred extra delays.
I considered using regular expressions. I don't know if acceptable to add dependencies for this purpose. But
regex-automatais already a transitive dependency throughbstr. I decided for now not to do that, since it seems more complicated than necessary, and I don't know if there is really value in matching things likethanks clippy.I don't know if this is a
fix:or afeat:. I went withfeat:.