dependabot / cli

A tool for testing and debugging Dependabot update jobs.
MIT License
250 stars 38 forks source link

add alternate azure git repo urls to credentials for submodules #372

Closed brettfo closed 1 month ago

brettfo commented 1 month ago

When a job is started with the azure provider, git_source credentials are provided for the dev.azure.com domain and that URL is ultimately used to clone the repo.

If a repo has a submodule and specifies the URL with the dev.azure.com format, everything is OK because the credentials are properly injected by the proxy, but there is an alternate format that's not handled: org.visualstudio.com/DefaultCollection/project/_git/repo and if a submodule clone is attempted with that URL, it's not detected as being functionally the same as the other URL and a 401 is returned, possibly making the job fail due to missing sources.

This PR adds the alternate org.visualstudio.com credentials.

A manual test was performed, first with the old behavior ensuring the 401 and again with the new behavior ensuring a correct 200 when cloning the submodule.