Fix submodule link to then project under subgroup
What does this MR do?
Fixes submodule link to the project under subgroup.
Why was this MR needed?
Make submodule links to nested projects work same as normal one.
Before this change, only last namespace in full path was extracted. It's fine unless you have a link to submodule under subgroups. In that case self_url? method returns false and a link is processed as external. I could not find a proper regex to cover all cases and correctly extract full path to the repository and instead used current instance hostname to get correct path to namespace and project.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Edited by username-removed-444