Skip to content
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

Improve repository finder search URL validation #20287

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

filiptronicek
Copy link
Member

Description

Adds generic validation for git URLs when inputting into the "New Workspace" repository search bar.

Supported are both full URLs (https://, http://, ssh://, git://) as well as SSH clone URLs (like [email protected]:gitpod-io/gitpod.git).

Related Issue(s)

Fixes ENT-596

How to test

  1. See tests I added for this
  2. Go to https://ft-better-374e81d1de.preview.gitpod-dev.com/new and play around with the input

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

Unit tests passed, and tried basic path on dashboard, it works well with prefix like https://

nit: Use /# url directly will not check? i.e. https://ft-better-374e81d1de.preview.gitpod-dev.com/#github.com/gitpod-io/gitpod (I used to use this format, sad to see it's not supported anymore)

image

@roboquat roboquat merged commit 2ffa717 into main Oct 11, 2024
18 checks passed
@roboquat roboquat deleted the ft/better-frontent-ctx-url-validation branch October 11, 2024 15:19
@filiptronicek
Copy link
Member Author

filiptronicek commented Oct 13, 2024

@mustard-mh that's a regression, I think we should still support implicit HTTP URLs without a protocol. Will raise a PR for that

Seems this is functioning as it always has. Check gitpod.io for the old version. Here is my try on the old input and as you can see there's no suggestion to use the URL.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants