SHARE
TWEET

Untitled

a guest May 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const graphql = require('@octokit/graphql')
  2.  
  3. const main = async repoNumber => {
  4.   const { repository } = await graphql(
  5.     `
  6.       query {
  7.         repository(owner: "SenseNet", name: "sn-client") {
  8.           pullRequest(number: ${repoNumber}) {
  9.             title
  10.             body
  11.             id
  12.           }
  13.         }
  14.       }
  15.     `,
  16.     {
  17.       headers: {
  18.         authorization: `token ${process.env.GITHUB_TOKEN}`,
  19.       },
  20.     },
  21.   )
  22.  
  23.   console.log(repository.pullRequest)
  24. }
  25.  
  26. main(164)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top