feat: operator schema accept command for curated FK review (P5)
This commit is contained in:
@@ -68,6 +68,8 @@ export interface FkReviewRecord {
|
||||
reviewedCandidatesDigest: string;
|
||||
annotationsDigest: string;
|
||||
workspaceRevision: string;
|
||||
/** Curated Git blob id accepted at review time (P5); absent for legacy host-file reviews. */
|
||||
blobId?: string;
|
||||
}
|
||||
|
||||
function sha256(value: string | Buffer): string {
|
||||
@@ -171,6 +173,7 @@ function decodeReview(value: unknown): FkReviewRecord {
|
||||
typeof record.reviewedCandidatesDigest !== "string"
|
||||
|| typeof record.annotationsDigest !== "string"
|
||||
|| typeof record.workspaceRevision !== "string"
|
||||
|| (record.blobId !== undefined && typeof record.blobId !== "string")
|
||||
) throw new Error("preprocessing review state is invalid");
|
||||
return record as unknown as FkReviewRecord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user