Last active
August 28, 2019 04:45
-
-
Save chrisvogt/de4fb3de87f4cbda8ec4144d89a822c0 to your computer and use it in GitHub Desktop.
Fetch the last n pull requests for a user from the 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
query { | |
user(login: "${username}") { | |
pullRequests( | |
last: ${maxRepos}, | |
orderBy: { | |
direction: ASC, | |
field: CREATED_AT | |
} | |
) { | |
nodes { | |
additions | |
bodyText | |
closed | |
closedAt | |
createdAt | |
mergeCommit { | |
author { | |
date, | |
name, | |
user { | |
avatarUrl | |
url | |
login | |
name | |
} | |
} | |
authoredDate | |
changedFiles | |
additions | |
deletions | |
message | |
messageHeadline | |
url | |
commitUrl | |
committedDate | |
} | |
mergeable | |
merged | |
mergedAt | |
number | |
repository { | |
name | |
nameWithOwner | |
openGraphImageUrl | |
url | |
} | |
title | |
updatedAt | |
url | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment