Add trusted auto-approval migration inventory
This commit is contained in:
parent
a2c8ba9442
commit
de8d184a4b
11 changed files with 381 additions and 3 deletions
|
|
@ -75,6 +75,7 @@ from repo_registry.web_api.schemas import (
|
|||
ReviewDecisionResponse,
|
||||
ScanSummaryResponse,
|
||||
SearchResultResponse,
|
||||
TrustedAutoApprovalMigrationRecordResponse,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -208,6 +209,20 @@ def list_quality_criteria() -> dict[str, object]:
|
|||
return criteria_registry_dict(load_quality_criteria())
|
||||
|
||||
|
||||
@app.get(
|
||||
"/review/migrations/trusted-auto-approvals",
|
||||
tags=["review"],
|
||||
response_model=list[TrustedAutoApprovalMigrationRecordResponse],
|
||||
)
|
||||
def list_trusted_auto_approval_migration_records(
|
||||
service: RegistryService = Depends(get_service),
|
||||
) -> list[dict[str, object]]:
|
||||
return [
|
||||
asdict(record)
|
||||
for record in service.list_trusted_auto_approval_migration_records()
|
||||
]
|
||||
|
||||
|
||||
@app.post(
|
||||
"/repos",
|
||||
status_code=201,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue