Skip to content

Instantly share code, notes, and snippets.

@bcoe
Created May 28, 2019 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcoe/83f03a928fef4ae6c0c78c19aa9f63bc to your computer and use it in GitHub Desktop.
Save bcoe/83f03a928fef4ae6c0c78c19aa9f63bc to your computer and use it in GitHub Desktop.
commits.graphql
query lastCommits($cursor: String, $owner: String!, $repo: String!, $perPage: Int, $maxFilesChanged: Int) {
repository(owner: $owner, name: $repo) {
defaultBranchRef {
target {
... on Commit {
history(first: $perPage, after: $cursor) {
edges{
node {
... on Commit {
message
oid
associatedPullRequests(first: 1) {
edges {
node {
... on PullRequest {
number
files(first: $maxFilesChanged) {
...
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment