ValentinFrancois / python-gitlab-submodule

List project submodules and get the commits they point to with python-gitlab
Apache License 2.0
3 stars 3 forks source link

Fix parsing submodule URL. #3

Closed darkdragon-001 closed 2 years ago

darkdragon-001 commented 2 years ago

Relative URLs should be handled first, only as a fallback we should use giturlparse. It won't throw and error, for relative paths so the try/catch was never used. Also the parsed attributes names changed.

Usually we want to iterative over all submodules. In case they are hosted somewhere else, we would still like to access all available properties like submodule path or commit id. I built in a fallback mechanism which could be checked in client code via subproject.project is None.

ValentinFrancois commented 2 years ago

Solved by https://github.com/ValentinFrancois/python-gitlab-submodule/pull/7, closing