Advertisement
Guest User

Untitled

a guest
May 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement