Class: Dependabot::Vcpkg::MetadataFinder

Inherits:
MetadataFinders::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/vcpkg/metadata_finder.rb

Instance Method Summary collapse

Instance Method Details

#homepage_urlObject



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/dependabot/vcpkg/metadata_finder.rb', line 13

def homepage_url
  # For individual VCPKG packages, try to find their specific homepage
  # If the dependency has a specific source URL, use that
  return source_url if source&.url != VCPKG_DEFAULT_BASELINE_URL.chomp(".git")

  # For the main VCPKG baseline dependency, return the VCPKG homepage
  if dependency.name == VCPKG_DEFAULT_BASELINE_DEPENDENCY_NAME
    "https://vcpkg.io"
  else
    # For individual packages, try to construct their VCPKG page URL
    "https://vcpkg.io/en/package/#{dependency.name}"
  end
end