I was struggling to kick off my self-assessment feedback for the year, so I came up with an idea to use the GitHub API to provide relevant data and jumpstart my writing process.
I started with this simple query:
query userInfo($login: String!) {
user(login: $login) {
name
repositoriesContributedTo(
first: 100
includeUserRepositories: true
contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]
) {
totalCount
pageInfo {
endCursor
hasNextPage
}
nodes {
nameWithOwner
description
}
}
contributionsCollection(
from: "2024-11-28T00:00:00.000Z"
to: "2025-11-28T23:59:59.999Z"
) {
commitContributionsByRepository(maxRepositories: 100) {
repository {
nameWithOwner
description
}
contributions(first: 100) {
totalCount
}
}
pullRequestContributionsByRepository(maxRepositories: 100) {
repository {
nameWithOwner
description
}
contributions(first: 100) {
totalCount
}
}
issueContributionsByRepository(maxRepositories: 100) {
repository {
nameWithOwner
description
}
contributions(first: 100) {
totalCount
}
}
totalCommitContributions
totalIssueContributions
totalPullRequestContributions
totalPullRequestReviewContributions
totalRepositoryContributions
}
}
}Since the online Explorer is gone you will need an Graphlq query or a curl to do so, you can also use the gh cli like so:
gh api graphql -F login='your-gh-handle' --paginate --slurp -f query='query userInfo($login: String!) { ... }'Note: Don’t forget to add the query variables:
{ "login": "your-gh-handle" }
This query provides a JSON output containing your contributions, including commits, pull requests, repository names, and descriptions. It's a great starting point for building a detailed self-assessment based on your activity.