Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Recognize variants of "thanks clippy"#42

Merged
Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
EliahKagan:thanks-clippy-detection
Apr 13, 2025
Merged

Recognize variants of "thanks clippy"#42
Sebastian Thiel (Byron) merged 1 commit into
GitoxideLabs:mainfrom
EliahKagan:thanks-clippy-detection

Conversation

@EliahKagan
Copy link
Copy Markdown
Member

@EliahKagan Eliah Kagan (EliahKagan) commented Apr 13, 2025

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-automata is already a transitive dependency through bstr. 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 like thanks clippy.

I don't know if this is a fix: or a feat:. I went with feat:.

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
Copy link
Copy Markdown
Member

@Byron Sebastian Thiel (Byron) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Byron Sebastian Thiel (Byron) merged commit 0c307d3 into GitoxideLabs:main Apr 13, 2025
10 checks passed
@EliahKagan Eliah Kagan (EliahKagan) deleted the thanks-clippy-detection branch April 13, 2025 08:33
@EliahKagan
Copy link
Copy Markdown
Member Author

Thus far, I thought it's only me having a need for it.

Well, I've been writing a capitalized Thanks, clippy in gitoxide commits, which I think has not been making it into changelogs, but now should. (#39)

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.

Case variants of "thanks clippy" are unrecognized

2 participants