boyter / searchcode-server

The offical home of searchcode-server where you can run searchcode locally. Note that master is generally unstable in the sense that it is not a release. Check releases for release versions https://github.com/boyter/searchcode-server/releases
https://searchcodeserver.com/
Other
364 stars 93 forks source link

Add GitLab Integration #117

Open boyter opened 7 years ago

boyter commented 7 years ago

GitLab does not support any code search so it would be a good idea to plug the gap by talking directly to the API. Need to set up a local copy to try this out.

NathanaelA commented 7 years ago

I can give you access to my private gitlab if you need and give you a account which you can create a new repos, and api keys, etc. (Just ping me if you need it).

boyter commented 7 years ago

Oh thats very generous! I actually just went by setting up a docker image locally to try things out. Means I can develop when I don't have network connectivity.

When I do finally get around to doing things though would you be happy to try out the first versions?

NathanaelA commented 7 years ago

Sure can. Just ping me when you have it done and I'll pull it and I'll try it.

boyter commented 6 years ago

https://docs.gitlab.com/omnibus/docker/

Probably the best way to get started with this.

sschuberth commented 6 years ago

GitLab does not support any code search [...]

To clarify, of the course the Premium / Ultimate / Enterprise / whatever version of GitLab running at https://gitlab.com/explore does support code search, but the Open Source version does not.

boyter commented 6 years ago

Ah interesting. Did not know that. I wonder what its like to use. The bitbucket one for example has some issues.

sschuberth commented 6 years ago

I wonder what its like to use.

Just give it a try:

https://gitlab.com/search?utf8=%E2%9C%93&search=search+term&group_id=&project_id=13083&search_code=true&repository_ref=master

boyter commented 6 years ago

Good news is that it passes the i++; test unlike most other search tools, sadly its a little slow. Going to add it to the demo.searchcodeserver.com instance to get a speed comparison.

mcarbonneaux commented 4 years ago

gitlab opensource not have search engine... only payed version have it...

the sourcecode server are more user friendly than the payed version of gitlab ...

gitlab payed version are based on elasticsearch... you must install elasticsearch to use this fonctionality on gitlab...

source code server embed apache luncen to do source indexing...

sourcecode server integration with gitlab while very usefull!

boyter commented 4 years ago

I really should look into this more closely. Comment to help remind me.

mcarbonneaux commented 4 years ago

The big difficulty is to manage group and project rigth in gitlab to present only project source search hit to authorized user....

Source code server support oauth?

if yes you can integrate to oauth of gitlab to know which user of the gitlab is connected and use gitlab api to get rigth of each project to know how to present git source search hit.

And with gitlab api you can retrieve gitlab project/group to add to index automatically.

You must index also project wiki that are git also...

you can index on gitlab hook on new commit also...