Make trigger phrase matching case-insensitive#1078
Make trigger phrase matching case-insensitive#1078mezoistvan wants to merge 1 commit intoanthropics:mainfrom
Conversation
Users may type `@Claude`, `@CLAUDE`, etc. in issues, PRs, and comments. Adding the `i` flag to all trigger regex patterns ensures these variations are recognized correctly. Made-with: Cursor
There was a problem hiding this comment.
LGTM — straightforward addition of the "i" flag to all four trigger regex instances, with good test coverage.
Extended reasoning...
Overview
This PR adds the case-insensitive ("i") flag to all four new RegExp(...) calls in src/github/validation/trigger.ts — covering issue body/title, PR body/title, PR review body, and comment body triggers. Two new test cases verify case-insensitive matching for issue and comment contexts.
Security risks
None. The change only relaxes matching strictness (case-insensitive instead of case-sensitive) on trigger phrase detection. There is no injection risk since escapeRegExp is already applied to the trigger phrase before embedding it in the regex pattern.
Level of scrutiny
Low scrutiny is appropriate. This is a small, mechanical change — adding a single flag argument to four identical regex constructions. The intent is clear, the implementation is correct, and the tests adequately cover the new behavior.
Other factors
The change is consistent across all four code paths, and the tests cover multiple casing variations (@Claude, @CLAUDE, @cLaUdE). No existing tests should be affected since the "i" flag only broadens what matches. No outstanding reviewer comments or prior reviews to consider.
Users may type
@Claude,@CLAUDE, etc. in issues, PRs, and comments. Adding theiflag to all trigger regex patterns ensures these variations are recognized correctly.Made-with: Cursor