-
Notifications
You must be signed in to change notification settings - Fork 578
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
Make links in search results work for SSH style repo URLs #19
Comments
https://github.com/etsy/Hound/blob/b0f9b34552cf28357b20f9dfeeac9f532a8c8375/src/hound/git/git.go#L52 { I'm pretty sure this does work as I've set it up for an internal gitlab install over SSH. It basically will take any uri that Git would I believe. |
Yeah it clones, but then all of the links from search results are broken I believe. |
Ah, I misunderstood what you were asking about. There was another user with a similar question and I thought you were asking a similar one. |
If you want to get something working quickly (i.e., hack the code for your site) the thing to change |
Given Hound already clones things into data/[repo-name] and it operates as a webapp, wouldn't it just make more sense to just self-host the not http:// repos so it just displays the local copy the search index is built on? [e.g. file:///, ssh] |
Just having Hound serve source seems like a good option (and likely would be a useful default when |
Maybe the path forward then is: If [contains github.com] -> Link as per current ? |
I guess so. Maybe there are some other special cases (like github) that are worth doing (gitlab, for example), but maybe not. What you suggest is probably a good compromise: DTRT most of the time, and simple to understand how to change it. |
http://[website-url]/[repo-name]/blob/master/[filename]#L[line-number] Maybe the UrlToRepo should just support tokens then? |
Dunno. Might be best to do something simple: so just cover cases 1 and 2 and forget about the And just leave a pointer to the relevant bit of javascript in the README, so people who want to can What I'd like is to have a collection of our local repositories, and they'll all map in the same way. So Anyway, my guess is doing something simple (handle github and support local (ssh, etc.) repositories |
When testing SVN support I noticed that in https://github.com/etsy/Hound/blob/master/pub/assets/js/hound.js#L292 there is a hardcoded reference to add '/blob/master/' to the URL. This does not work for SVN (I think it will only for for git repos ❓) and supporting multiple VCS via PR #39 breaks the link to the source files. |
Thanks @MoriTanosuke, we should fix that. Can you open an issue, or fix it as part of your SVN PR? |
This is a slightly more flexible solution for hound-search#19 than d2c1d98, which worked for private github.com repos but not for repos on a different domain.
fix 404s for Github Enterprise repos (see #19)
@kellegous it seems like with your change we can update the README/example config and this issue will be able to be fully handled by the new functionality. |
We now have a |
Currently Hound only supports HTTP style URLs for repos, and it would be nice to support SSH as well.
The text was updated successfully, but these errors were encountered: