-
Notifications
You must be signed in to change notification settings - Fork 469
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
Clean up bot regexes #7549
Merged
Merged
Clean up bot regexes #7549
Commits on Jan 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 12704d3 - Browse repository at this point
Copy the full SHA 12704d3View commit details -
Harmonize version parsing in bot regexes
Bot version parsing in bot regexes is consistently done using `[\d.]+`. In particular, the following changes are made: - drop wrapper parentheses, where it is used, as the bot version is not exposed by the parser, and there is inconsistent use of grouping parentheses in the various regexes; - `[\d+.]` is assumed to be a typo picked up from the use of `\d+.` outside character classes; - `[\d+\.]` additionally uses a superfluous escape on the dot, which is not needed inside character classes; - plain `\d` or `[0-9]` are replaced with the common expression, as they will match the same agent strings, but include more of the version string in the match–mainly, this drives consistency; The main change that should arise here is that the plus character will no longer be recognised as part of the bot/version match. The tests don't suggest that this will be an issue. (If needed, the `+` can be brought back, while keeping consistency)
Configuration menu - View commit details
-
Copy full SHA for 673ef8b - Browse repository at this point
Copy the full SHA 673ef8bView commit details -
Prefer non capturing parentheses in bot regexes
Given that the groupings don't have a meaning, there's little point in keeping them as part of the regexes. In addition, superfluous parentheses are dropped.
Configuration menu - View commit details
-
Copy full SHA for bcbec7a - Browse repository at this point
Copy the full SHA bcbec7aView commit details -
Drop wildcard matches at end of input in bot regexes
The wildcard matches extend the match, but don't add value as the match is already made at that point.
Configuration menu - View commit details
-
Copy full SHA for f6ad918 - Browse repository at this point
Copy the full SHA f6ad918View commit details -
Put - at end of character class in regex
This avoids the need to escape the dash in character classes.
Configuration menu - View commit details
-
Copy full SHA for 9dc9bda - Browse repository at this point
Copy the full SHA 9dc9bdaView commit details
Commits on Feb 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8bb0102 - Browse repository at this point
Copy the full SHA 8bb0102View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9199a3 - Browse repository at this point
Copy the full SHA d9199a3View commit details
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.