feat(task-017): implement git publishing dry-run and commit flow
This commit is contained in:
@@ -15,7 +15,7 @@ const compiled = ts.transpileModule(source, {
|
||||
const moduleExports = {};
|
||||
new Function("exports", compiled.outputText)(moduleExports);
|
||||
|
||||
const { buildProductionArtifactRows } = moduleExports;
|
||||
const { buildDetailSummary, buildProductionArtifactRows } = moduleExports;
|
||||
|
||||
const rows = buildProductionArtifactRows([
|
||||
{
|
||||
@@ -102,3 +102,40 @@ assert.equal(rows[0].status, "SUCCEEDED");
|
||||
assert.deepEqual(rows[0].usedEvidenceIds, ["e1", "e2"]);
|
||||
assert.equal(rows[1].status, "FAILED");
|
||||
assert.deepEqual(rows[1].unsupportedClaims, ["Unverified claim"]);
|
||||
|
||||
const detailSummary = buildDetailSummary({
|
||||
article: {
|
||||
id: "a1",
|
||||
target_site_id: "site1",
|
||||
status: "PUBLISH_COMMIT_CREATED",
|
||||
publishing_status: "PUBLISH_COMMIT_CREATED",
|
||||
brief_description: "desc",
|
||||
language: "en",
|
||||
content_type: "longform_guide",
|
||||
created_at: "2026-05-21T00:00:00Z",
|
||||
updated_at: "2026-05-21T00:00:00Z",
|
||||
},
|
||||
target_site: { name: "Demo Site" },
|
||||
workflow_events: [],
|
||||
agent_jobs: [],
|
||||
publish_commit: {
|
||||
id: "pc1",
|
||||
article_id: "a1",
|
||||
target_site_id: "site1",
|
||||
repository_url: "/tmp/repo.git",
|
||||
branch: "main",
|
||||
commit_sha: "abc123",
|
||||
status: "PUBLISH_COMMIT_CREATED",
|
||||
created_at: "2026-05-21T00:00:00Z",
|
||||
content_bundle_manifest: {
|
||||
validation: {
|
||||
label: "Best-effort content-shape validation only.",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
detailSummary.publishingValidationLabel,
|
||||
"Best-effort content-shape validation only.",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user