Created
February 19, 2021 22:43
-
-
Save andersy005/c0bf0db066645168da91b793965e6868 to your computer and use it in GitHub Desktop.
GitHub GraphQL API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const query = `query($owner:String!, $name:String!){ | |
| repository(owner: $owner, name: $name) { | |
| pullRequests(first: 100, states: OPEN, orderBy: {field: UPDATED_AT, direction: DESC}) { | |
| nodes { | |
| title | |
| number | |
| headRef { | |
| name | |
| target { | |
| oid | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }` | |
| const variables = { | |
| owner: github.context.repo.owner, | |
| name: github.context.repo.repo, | |
| } | |
| const results = await octokit.graphql(query, variables) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment