feat: getIssue add path
This commit is contained in:
		
							parent
							
								
									3e039e27a2
								
							
						
					
					
						commit
						9942380b0c
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue