新增 release artifact URL workflow summary API
This commit is contained in:
@@ -674,6 +674,59 @@ export async function loadProjectReleaseReadinessArtifactUrlWorkflow({
|
||||
}
|
||||
}
|
||||
|
||||
export function createProjectReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
|
||||
workflow = {},
|
||||
) {
|
||||
const missing = arrayOrEmpty(workflow?.missing);
|
||||
const ready = workflow?.ready === true;
|
||||
const statusText = ready ? "Ready" : "Blocked";
|
||||
const detailText = ready
|
||||
? "Artifact URL workflow complete"
|
||||
: (missing.length > 0 ? missing.join(", ") : workflow?.fetchError ?? "artifact URL workflow blocked");
|
||||
return {
|
||||
apiName: "project-release-readiness-artifact-url-workflow-summary-view-model",
|
||||
viewModelVersion: 1,
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
title: "Project release artifact URL workflow",
|
||||
statusText,
|
||||
detailText,
|
||||
statusLine: `${statusText}: ${detailText}`,
|
||||
rows: [
|
||||
{
|
||||
id: "artifact-url",
|
||||
label: "Artifact URL",
|
||||
value: workflow?.artifactUrl || "missing",
|
||||
},
|
||||
{
|
||||
id: "fetch",
|
||||
label: "Fetch",
|
||||
value: workflow?.fetched === true ? `ready${workflow?.httpStatus ? ` (${workflow.httpStatus})` : ""}` : "blocked",
|
||||
},
|
||||
{
|
||||
id: "json-workflow",
|
||||
label: "JSON workflow",
|
||||
value: workflow?.jsonWorkflow?.ready === true ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "artifact-validation",
|
||||
label: "Artifact validation",
|
||||
value: workflow?.validation?.ready === true ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "next-command",
|
||||
label: "Next command",
|
||||
value: workflow?.actionPlan?.nextCommand ?? "none",
|
||||
},
|
||||
{
|
||||
id: "missing",
|
||||
label: "Missing workflow evidence",
|
||||
value: missing.length > 0 ? missing.join(", ") : "none",
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function createProjectReleaseReadinessArtifactValidation(artifact = {}) {
|
||||
const artifactObject = objectOrEmpty(artifact);
|
||||
const releaseGate = objectOrEmpty(artifactObject.releaseGate);
|
||||
|
||||
Reference in New Issue
Block a user