generated from coulomb/repo-seed
Add trusted auto-approval migration inventory
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -524,6 +524,21 @@ class ReviewDecisionResponse(BaseModel):
|
||||
decision_kind: str = "other"
|
||||
|
||||
|
||||
class TrustedAutoApprovalMigrationRecordResponse(BaseModel):
|
||||
repository_id: int
|
||||
repository_name: str
|
||||
repository_url: str
|
||||
repository_status: str
|
||||
analysis_run_id: int | None
|
||||
analysis_run_status: str
|
||||
scanner_version: str
|
||||
review_decision_id: int
|
||||
decision_created_at: str
|
||||
notes: str
|
||||
current_approved_ability_count: int
|
||||
recommended_next_step: str
|
||||
|
||||
|
||||
class QualityCriterionResponse(BaseModel):
|
||||
id: str
|
||||
title: str
|
||||
|
||||
Reference in New Issue
Block a user