generated from coulomb/repo-seed
Repo stats and features as aggregates
This commit is contained in:
@@ -120,6 +120,7 @@ class RegistryService:
|
||||
repository_id: int,
|
||||
*,
|
||||
source_path: str | None = None,
|
||||
use_cached_checkout: bool = False,
|
||||
access_username: str | None = None,
|
||||
access_password: str | None = None,
|
||||
) -> ScanSummary:
|
||||
@@ -134,12 +135,20 @@ class RegistryService:
|
||||
)
|
||||
try:
|
||||
if source_path is None:
|
||||
checkout = self.ingestion.resolve(
|
||||
repository.url,
|
||||
branch=repository.branch,
|
||||
access_username=access_username,
|
||||
access_password=access_password,
|
||||
)
|
||||
if use_cached_checkout:
|
||||
checkout = self.ingestion.cached_checkout(repository.url)
|
||||
if checkout is None:
|
||||
raise RuntimeError(
|
||||
"cached checkout was requested, but no checkout exists "
|
||||
"for this repository"
|
||||
)
|
||||
else:
|
||||
checkout = self.ingestion.resolve(
|
||||
repository.url,
|
||||
branch=repository.branch,
|
||||
access_username=access_username,
|
||||
access_password=access_password,
|
||||
)
|
||||
scan_source = checkout.source_path
|
||||
else:
|
||||
scan_source = source_path
|
||||
|
||||
Reference in New Issue
Block a user