Repository navigation
chore: move app URL parsing to its own package - #11651
Merged
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Emyrk
marked this pull request as ready for review
January 17, 2024 01:20
deansheather
approved these changes
Jan 17, 2024
Comment on lines
+13
to
+14
| // nameRegex is the same as our UsernameRegex without the ^ and $. | ||
| nameRegex = "[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*" |
Collaborator
There was a problem hiding this comment.
I think it should still trim the old regex instead TBH
Member
Author
There was a problem hiding this comment.
Because of import loops, we would need to put that regex in some other package then 😢.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

What this does
Parsing
CODER_WILDCARD_ACCESS_URLas aurl.URLwas always incorrect (see https://goplay.tools/snippet/YHUpcSkVrli). Since wildcard urls do not have a scheme, the url parsing was never accurate to how it parsed things. And it would not accept ports.We have a wildcard parse function, so why not make that the validation instead of using the url and
url.String().Lastly I moved
appurlto it's own package to avoid import loops. This is a reasonable thing to package.In support of #8189. We need to move the field from a url to a string to support ports.