projectsyn / lieutenant-operator

The Project Syn Inventory API Operator
https://docs.syn.tools/lieutenant-operator/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Fix initialization of GitLab repos #298

Closed bastjan closed 2 months ago

bastjan commented 2 months ago

GitLab returns 404 on a repository/tree call if the repo has zero commits. We checked against the error message but the client library started to return a static 404 error which makes our check fail.

This commit changes the checking logic to check for the clients static ErrNotFound error. This might catch other errors too (repo does not exists at all), but those errors will be caught in the next step.

Checklist