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

Fallback to GitHub search #43

Open
danielbayley opened this issue Sep 8, 2017 · 3 comments
Open

Fallback to GitHub search #43

danielbayley opened this issue Sep 8, 2017 · 3 comments

Comments

@danielbayley
Copy link

Why not fallback to https://github.com/search?q={package} if no {registry} is provided?

@stefanbuck
Copy link
Member

Maybe I'm too strict, but I have a few concerns about it. First of all the live resolver should be reliable as possible. What if the requested package and repository name are different. Another issue what if the package name is too generic the search api would return the most popular repository I guess. Also what if a package name is popular in more than one languages? All this unknowns can be easily lead to a wrong redirect.

As mentioned before I think the live resolver should be reliable as possible and this isn't possible with a search request. I'm happy to discuss this further. @josephfrazier what's your view on this?

@stefanbuck
Copy link
Member

I just remembered that the GitHub search API has a language filter which we can use to differentiate between different package for different languages.

https://help.github.com/articles/searching-repositories/#search-based-on-the-main-language-of-a-repository

@josephfrazier
Copy link
Member

josephfrazier commented Dec 26, 2018

I share the concerns about redirecting to a particular search result, given the likelihood that it would be wrong. I also think that searching github specifically is a bit too biased, because there are alternatives such as gitlab and others. We could fall back to a google/etc search results page for convenience, but even that feels a little out of place, in my opinion.

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

No branches or pull requests

3 participants