Created
August 23, 2022 16:21
-
-
Save amenocal/218c1b2188e2722351af652d8da68b92 to your computer and use it in GitHub Desktop.
GraphQL get CheckRuns for latest commit
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
| query FullPullRequestQuery( | |
| $repositoryOwner: String! | |
| $repositoryName: String! | |
| $pullRequestNumber: Int! | |
| ) { | |
| repository(owner: $repositoryOwner, name: $repositoryName) { | |
| pullRequest(number: $pullRequestNumber) { | |
| id | |
| state # PR state. For example, { "OPEN", "MERGED", "CLOSED" } | |
| isDraft # Identifies if the pull request is a draft. | |
| headRef { | |
| name # Branch name | |
| target { | |
| oid # Tip SHA of the branch | |
| } | |
| } | |
| number # The PR number (for example: 1083) | |
| repository { | |
| nameWithOwner # For example, "amenocal/reponame" | |
| } | |
| title | |
| url | |
| createdAt | |
| updatedAt | |
| baseRefName | |
| baseRefOid | |
| commits(last: 1) { | |
| nodes { | |
| commit { | |
| oid | |
| pushedDate | |
| checkSuites(last: 20) { | |
| totalCount | |
| nodes { | |
| conclusion | |
| status | |
| url | |
| checkRuns(last: 10) { | |
| totalCount | |
| nodes { | |
| conclusion | |
| name | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment