searchcode-server icon indicating copy to clipboard operation
searchcode-server copied to clipboard

Add GitLab Integration

Open boyter opened this issue 8 years ago • 11 comments

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.

boyter avatar May 25 '17 22:05 boyter

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).

NathanaelA avatar Jun 15 '17 05:06 NathanaelA

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?

boyter avatar Jun 15 '17 05:06 boyter

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

NathanaelA avatar Jun 15 '17 05:06 NathanaelA

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

Probably the best way to get started with this.

boyter avatar Oct 10 '17 00:10 boyter

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.

sschuberth avatar Mar 14 '18 07:03 sschuberth

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

boyter avatar Mar 14 '18 20:03 boyter

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

sschuberth avatar Mar 14 '18 20:03 sschuberth

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.

boyter avatar Mar 14 '18 23:03 boyter

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!

mcarbonneaux avatar Feb 09 '20 18:02 mcarbonneaux

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

boyter avatar Feb 09 '20 22:02 boyter

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...

mcarbonneaux avatar Feb 10 '20 10:02 mcarbonneaux