fix getIssue
This commit is contained in:
		
							parent
							
								
									a1e1ac7615
								
							
						
					
					
						commit
						541ddf7655
					
				
					 3 changed files with 2653 additions and 511 deletions
				
			
		
							
								
								
									
										3161
									
								
								cache/issues.json
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3161
									
								
								cache/issues.json
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -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[]> {
 | 
					export async function getIssues(repo: string, token?: string): Promise<Issue[]> {
 | 
				
			||||||
    //check https://docs.github.com/en/rest/reference/issues#list-repository-issues
 | 
					    //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) {
 | 
					    if(!token) {
 | 
				
			||||||
        const res = await fetch(url);
 | 
					        const res = await fetch(url);
 | 
				
			||||||
        return await res.json();
 | 
					        return await res.json();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,6 +120,7 @@ async function main(args: string[]) {
 | 
				
			||||||
            //skip
 | 
					            //skip
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
 | 
					            log.info(`render ${x.Chapter.name}\n`);
 | 
				
			||||||
            x.Chapter.content = Eta.render(x.Chapter.content, {
 | 
					            x.Chapter.content = Eta.render(x.Chapter.content, {
 | 
				
			||||||
                issues: issues,
 | 
					                issues: issues,
 | 
				
			||||||
                table: table,
 | 
					                table: table,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue