diff --git a/tools/getIssue.ts b/tools/getIssue.ts index df574f5..56b1981 100644 --- a/tools/getIssue.ts +++ b/tools/getIssue.ts @@ -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); + } } \ No newline at end of file