hygieia / hygieia-scm-gitlab-collector

Hygieia Collector for Gitlab SCM
https://github.com/capitalone/Hygieia/blob/gh-pages/pages/hygieia/collectors/scm/gitlab.md
Apache License 2.0
4 stars 13 forks source link

Gitlab collector with GitLab Enterprise Edition 9.1.1 #4

Open narayan1ap opened 7 years ago

narayan1ap commented 7 years ago

Hi

Gitlab collector with GitLab Enterprise Edition 9.1.1 seems to be not working. It is giving 404 error.

I debugged code and found out that the URl was having api/v3/projects when changed it to api/v4/projects it started working.

Also one more change i need to make . Repo name was empty . I had to add /api/v4/projects/projectid/repository

Some light on this will be appreciated.

Thanks

rob-miller-777 commented 7 years ago

Yeah, the Gitlab collector was built when only v3 of the api was available. Someone will need to update the collector to include a v4 version. However, I am surprised that they don't still support v3 in the 9.1.1 version.

rob-miller-777 commented 7 years ago

According to their doc, v3 should still be available until at least version 9.3. https://docs.gitlab.com/ce/api/v3_to_v4.html

narayan1ap commented 7 years ago

But somehow v3 is not working with our gitlab. Thanks for clarification. I will update it .

rob-miller-777 commented 7 years ago

We will probably need to create two implementations of the Gitlab Client, one for v3 and one for v4, then just make it configurable.