Conversation
Previously, GitHub usernames containing hyphens were broken: if a hyphenated username were provided in a `r=some-body` request to bors, bors would interpret that request as `r=some`. The reason for this is the regex parsing the username in those comments was only looking for a word (`\w+`, or equivalently `[a-zA-Z0-9_]+`), and words end at hyphens. This changes those regular expressions to look for any of the word characters and additionally a hyphen character (`[a-zA-Z0-9_-]+`).
Collaborator
|
Thanks! Note that Rust is using an out of date bors and will not get this change until some maintenance is done to bring our infrastructure up to date. |
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.
Previously, GitHub usernames containing hyphens were broken: if a
hyphenated username were provided in a
r=some-bodyrequest to bors,bors would interpret that request as
r=some.The reason for this is the regex parsing the username in those comments
was only looking for a word (
\w+, or equivalently[a-zA-Z0-9_]+),and words end at hyphens.
This changes those regular expressions to look for any of the word
characters and additionally a hyphen character (
[a-zA-Z0-9_-]+).I am not able to test this in production (I don't have the configuration)
but my experiments at the interpreter suggest this regex is correct for
parsing usernames with hyphens.
But if anyone has a good clue how to check if this works, let me know.
Closes #38.