fix getIssue

This commit is contained in:
monoid 2022-06-11 19:38:24 +09:00
parent a1e1ac7615
commit 541ddf7655
3 changed files with 2653 additions and 511 deletions

3161
cache/issues.json vendored

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ import "https://deno.land/std@0.136.0/dotenv/load.ts";
*/
export async function getIssues(repo: string, token?: string): Promise<Issue[]> {
//check https://docs.github.com/en/rest/reference/issues#list-repository-issues
const url = `https://api.github.com/repos/${repo}/issues?per_page=100`;
const url = `https://api.github.com/repos/${repo}/issues?per_page=100&labels=feature&state=all`;
if(!token) {
const res = await fetch(url);
return await res.json();

View File

@ -120,6 +120,7 @@ async function main(args: string[]) {
//skip
}
else {
log.info(`render ${x.Chapter.name}\n`);
x.Chapter.content = Eta.render(x.Chapter.content, {
issues: issues,
table: table,