Skip to content

Stats

The card counts five things by default — stars earned, commits, pull requests, issues and the repositories contributed to — and grades them into a rank from C to S. Anything else it can show is opt-in through show.

The stats card for a GitHub user

?username=octocat&show_icons=true
OptionWhat it is
usernameThe GitHub login to draw stats for

show takes a comma-separated list. Each value adds a line to the card:

The stats card with extra stats and a percentile rank

?username=octocat&show_icons=true&show=reviews,prs_merged,contributions&rank_icon=percentile
ValueThe line it adds
reviewsPull requests reviewed
prs_mergedPull requests merged
prs_merged_percentageWhat share of your PRs were merged
discussions_startedDiscussions started
discussions_answeredDiscussions answered
prs_openedPull requests opened, counted by search
prs_commentedPull requests commented on
prs_reviewedPull requests reviewed, counted by search
issues_openedIssues opened, counted by search
issues_commentedIssues commented on
contributionsContributions in the counted range
contributed_to_all_timeRepositories contributed to, across every year of the account

Each extra stat costs another request, so ask only for what you draw.

hide takes the same shape, and removes a line the card would otherwise draw: stars, commits, prs, issues, contributed_to.

Either list takes any stat the card draws. A stat named in both is left out, and so is not fetched.

OptionValuesWhat it does
showthe list aboveExtra stats to draw
hidestars commits prs issues contributed_toDefault stats to leave out
show_iconstrue falseDraw an icon beside each stat
hide_ranktrue falseLeave out the rank circle
rank_icondefault github percentileWhat the rank circle shows
ring_colora hex colorThe rank ring, when it should differ from the title
include_all_commitstrue falseCount commits of all time rather than the counted range
from / to2024, 2024-03, 2024-03-15The range commits and contributions are counted in
exclude_repoowner/name or nameRepositories to leave out of the totals
scopeowner/name owner/*Where the search-based stats count
affiliationOWNER COLLABORATOR ORGANIZATION_MEMBERWhich repositories count towards the stars and the rank
include_own_repostrue falseCount contributions to your own repositories

Plus the common options.

prs_opened, prs_commented, prs_reviewed, issues_opened and issues_commented are counted by GitHub’s search, and so are commits under include_all_commits. scope narrows that search: owner/name for one repository, owner/* for everything an owner holds, up to ten entries.

?username=octocat&show=prs_opened&scope=vitest-dev/*,octocat/dotfiles

Each scoped line names its scope, PRs Created (vitest-dev/*) or PRs Created (2 scopes). A bare name is an error, being a repository or an owner with nothing to say which, and so is a scope when nothing on the card is counted by search.

affiliation filters the repository list GitHub answers with, and that list is used for the stars total alone. Commits, pull requests, reviews, issues, discussions and repositories contributed to are counted across the whole of GitHub whatever affiliation says. The default is OWNER — the repositories you own.

?username=octocat&affiliation=OWNER,ORGANIZATION_MEMBER

Widening it moves the stars and the rank they feed into: ORGANIZATION_MEMBER counts the stars of every repository in every organization you belong to. hide=stars takes the line off the card, but the stars still count towards the rank.

from and to bound what “commits” and “contributions” mean, and both ends are inclusive. Either may be left out: an open end is filled with the widest range GitHub will answer for.

?username=octocat&from=2020&to=2024

include_all_commits=true overrides the range for the commit count alone — it asks for every commit the account has ever made.