Repo stats and features as aggregates
This commit is contained in:
parent
c0a044fa0b
commit
2313e8675e
10 changed files with 258 additions and 24 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue