25 lines
1018 B
JavaScript
25 lines
1018 B
JavaScript
import { execFileSync } from "node:child_process";
|
|
|
|
const requiredSubjects = [
|
|
"fix(POSTV1-07): 固定画布布局与文字贴纸选择",
|
|
"fix(POSTV1-07): 自动关闭编辑器操作提示",
|
|
"fix(POSTV1-08): 修复文字拖动闪烁与自动保存",
|
|
"fix(POSTV1-09): 展示项目生成图片",
|
|
"feat(POSTV1-10): 增加统一交互反馈",
|
|
"fix(POSTV1-11): 修复生成提交的会话令牌轮换",
|
|
"fix(POSTV1-runtime): 改善后台启动与状态窗口可见性",
|
|
"fix(POSTV1-browser): 同时支持 Chrome 150 与 151",
|
|
"fix(POSTV1-editor): 修复多选拖动与底图调整",
|
|
];
|
|
|
|
const subjects = new Set(execFileSync("git", ["log", "--format=%s", "HEAD"], { encoding: "utf8" })
|
|
.split(/\r?\n/u)
|
|
.filter(Boolean));
|
|
const missing = requiredSubjects.filter((subject) => !subjects.has(subject));
|
|
|
|
if (missing.length > 0) {
|
|
throw new Error(`postv1_ui_lineage_incomplete:${missing.join("|")}`);
|
|
}
|
|
|
|
console.log(JSON.stringify({ required_commit_count: requiredSubjects.length, status: "passed" }));
|