feat: getIssue add path

This commit is contained in:
monoid 2022-04-20 17:11:45 +09:00
parent 3e039e27a2
commit 9942380b0c
1 changed files with 7 additions and 1 deletions

View File

@ -38,5 +38,11 @@ if (import.meta.main) {
}
const issues = await getIssues("vi117/scrap-yard", token);
issues.sort((a, b) => a.number - b.number);
console.log(JSON.stringify(issues,undefined,2));
const content = JSON.stringify(issues, null, 2);
if(typeof args.path === "string"){
Deno.writeTextFileSync(args.path, content);
}
else{
console.log(content);
}
}