Skip to content

Use SSH URL in composer metadata source entry for non-public projects

What does this MR do and why?

This change will use the SSH URL in the PHP Composer metadata source entry for non-public projects. For public projects it still uses the HTTP(S) url, since that doesn't require any authentication for those projects.

Some points / remarks:

  • The original code didn't check if HTTP(S) cloning was enabled, so I also didn't add this for SSH. Should we?
  • For the tests I originally also tested internal projects, but I had too many helpers according to Robocop. Any better way to structure this test to also test that?
  • Also for the tests: I'm not really happy with the package_indices subject, but I obviously can't have two subjects and I don't want to duplicate a lot of the test. WDYT? I could also have two describe blocks (or even three with an internal project): one for the public packages that performs all three tests and one for the other (or other two) that only tests the JSON, extracting out the expected_json method.

feature flag rollout issue: #422171 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #329246 (closed)

Edited by David Fernandez

Merge request reports