feat: sort issues

This commit is contained in:
monoid 2022-04-19 18:30:41 +09:00
parent 82a66202fc
commit ef8a8a967f
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ type Issue = {
url: string;
title: string;
body: string;
number: number,
labels: {
name: string;
}[]
@ -39,5 +40,6 @@ if (import.meta.main) {
Deno.exit(1);
}
const issues = await getIssues("vi117/scrap-yard", token);
console.log(issues.map(i => `# ${i.title}\n${i.body}`).join("\n\n"));
issues.sort((a, b) => a.number - b.number);
console.log(issues.map(i => `# (${i.number}) ${i.title}\n${i.body}`).join("\n\n"));
}