import testcaseData from "./testcases.json" assert { type: "json"}; type Testcase = { id: number, subId: number | null, content: string, procedure: string, testData: string| null, expected: string, actual: string, pass: boolean } const testcase: Testcase[] = testcaseData; import {Issue} from "./githubType.ts" const data = await Deno.readTextFile("../cache/issues.json") const issues = JSON.parse(data) as Issue[] const table = new Map(); issues.forEach((x)=>{ const category = x.title.split(":")[0]; if(!category) return; let c = table.get(category) if(!c){ c = []; table.set(category,c); } c.push(x); }); const keys = Array.from(table.keys()); keys.forEach(x=>{ console.log(`\n### ${x}\n`); const issues = table.get(x); console.log(""); console.log(""); console.log(""); //console.log(""); console.log(""); console.log(""); console.log(""); console.log(""); console.log(""); console.log(""); console.log(""); console.log(""); const ts = issues!.map(x=> testcase.filter(y=>y.id==x.number)).flat() as Testcase[]; if(ts?.length == 0) return; //console.log(``); ts.forEach((y,i)=>{ //if(i>0) console.log(""); const id = y.subId ? `${y.id}-${y.subId}` : y.id; console.log(``); console.log(``); console.log(``); console.log(``); console.log(``); console.log(""); }) console.log(""); console.log("
CategoryIDContentProcedureTest DataP/F
${x}
${id}${y.content}${y.procedure}${y.testData ?? ""}${y.pass ? "P" : "F"}
"); })