class Dependabot::GitMetadataFetcher
def skip_git_suffix(uri)
def skip_git_suffix(uri) # TODO: Unlike the other providers (GitHub, GitLab, BitBucket), as of 2023-01-18 Azure DevOps does not support the # ".git" suffix. It will return a 404. # So skip adding ".git" if looks like an ADO URI. # There's no access to the source object here, so have to check the URI instead. # Even if we had the current source object, the URI may be for a dependency hosted elsewhere. # Unfortunately as a consequence, urls pointing to Azure DevOps Server will not work. # Only alternative is to remove the addition of ".git" suffix since the other providers # (GitHub, GitLab, BitBucket) work with or without the suffix. # That change has other ramifications, so it'd be better if Azure started supporting ".git" # like all the other providers. uri = uri_sanitize(uri) uri = SharedHelpers.scp_to_standard(uri) uri = URI(uri) hostname = uri.hostname.to_s hostname == "dev.azure.com" || hostname.end_with?(".visualstudio.com") end