Do this once and save the user ids
Url is https://api.github.com/users/[GITHUB_USER_NAME]
I used the following command, filling in the different user names. (jsonpath is not available by default):
curl https://api.github.com/users/johndbritton | jsonpath node_id
-
Go to the GitHub GraphQL API explorer https://developer.github.com/v4/explorer/ and sign in.
-
Add the following the the query section:
query inputArray($ids: [ID!]!) {
nodes(ids: $ids) {
... on User {
id
name
pullRequests(states: [OPEN, MERGED, CLOSED], last: 10) {
nodes {
id
title
body
url
createdAt
repository {
name
nameWithOwner
}
labels(first: 10) {
edges {
node {
name
}
}
}
}
}
}
}
}
- Add a list of your student node Ids to the query variables section:
{
"ids": [
"MDQ6VXNlcjI4MzQ5Ng==",
"MDQ6VXNlcjEyMzM0NQ==",
"MDQ6VXNlcjM1NzE1MzI5"
]
}
- Open the
Explorer
tab to add / remove info as you like
This was the simplest way to get this up in running. If you want to take the time to properly set up authentication and a query explorer, you'll have a better experience.
Also, I highly recommend Insomnia over Postman for MacOS if you haven't checked it out yet
Screenshot of the result: