Returns a SSH url for go-get=1
What does this MR do?
Makes some adjustments so https://gitlab.com/gitlab-org/gitlab-ce?go-get=1
can return a SSH url if Enabled Git access protocols
setting is set to Only SSH
. If not, it still returns the default HTTP version.
Are there points in the code the reviewer needs to double check?
Part of me wanted to unify the strategies to build the urls in the middleware and the spec, but I just followed the pattern. Maybe this was made this way on purpose. I'm not sure.
Why was this MR needed?
This situation was pointed by @tomdxw in #38858 (closed).
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #38858 (closed).
Edited by Guilherme Vieira