Nested projects to not work
git-lab
does not work, if the project has a path with slashes (/
). E.g. leonmortenrichter/git-lab
does not work.
What is the reason for that?
The error does not occur when using python-gitlab
version <=2.6.0
. The change seems to be introduced in version 2.7.0
of python-gitlab
.
Version 2.7.0+
# Fetch the project via it's unescaped url:
gitlab.projects.get("leonmorten/git-lab") #=> Works
# Fetch the project via it's escaped url:
gitlab.projects.get("leonmorten%2Fgit-lab") #=> Raises GitlabGetError with status code 404
Version <= 2.6.0
# Fetch the project via it's unescaped url:
gitlab.projects.get("leonmorten/git-lab") #=> Works
# Fetch the project via it's escaped url:
gitlab.projects.get("leonmorten%2Fgit-lab") #=> Works
Possible solutions
- Use a fixed version of
python-gitlab
- Adapt
Utils.str_id_for_url
- Request a change in
python-gitlab