Closed lowlighter closed 2 years ago
Something like this:
{ try { const {data:{search:{nodes:[{number:pr}]}}} = await fetch("https://api.github.com/graphql", { method:"POST", headers:{ Authorization: `bearer ${Deno.env.get("GITHUB_TOKEN")}` }, body:JSON.stringify({ query:`query { search(query: "repo:lowlighter/gracidea is:pr is:open hash:${Deno.env.get("VERCEL_GIT_COMMIT_SHA")}", type: ISSUE, first: 10) { nodes { ... on PullRequest { number } } } }` }) }).then(response => response.json()) } catch (error) { log.warn(`failed to get pull request: ${error.message}`) } }
Something like this: