deno.land / x / at_test@v8.1.0 / src / externalInterface / gitHub.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { denoRun } from "./denoRun.ts";
type IssuesStruct = Array<{ body: string; number: number; title: string }>;type FetchIssues = () => Promise< never[] | { number: number; title: string; body: string; }[]>;/** * `gh` to get the issues. */export const fetchIssues: FetchIssues = () => denoRun({ cmd: ["gh", "issue", "list", "--assignee=@me", "--json=number,title,body"], }).then<IssuesStruct>((v) => { if (typeof v === "string") { return JSON.parse(v); } return []; }) .catch((e) => { console.error(e); return []; });
at_test

Version Info

Tagged at
a year ago