Skip to contents

The contributions card shows how much a GitHub user has done: their contributions since they joined GitHub and in the last 12 months, their commits, their streaks of days with contributions and the languages they work in. Its numbers are those of the contribution graph on the user’s profile, the calendar of green squares. This article explains each of them, and the options that change the card. Get started shows how to collect your own statistics and put the cards on your profile, and The statistics card and More cards explain the others.

example_stats() returns the made-up statistics of a user named example-user, who joined GitHub on 14 March 2019 and whose statistics were collected on 3 December 2026, so that this article runs without a token. contributions_card() draws their card, as an SVG or a PNG file:

contributions_card(stats, "rghcard-contributions.svg")
GitHub contributions of example-user Contributions: 4.1K (since Mar 2019), Last 12 months: 1.2K (contributions), Commits: 2.5K (public repositories), Current streak: 23 days (since 10 Nov), Longest streak: 41 days (7 Apr – 17 May 2025), 14 Mar 2019 – 3 Dec 2026.example-user· GitHub contributions14 Mar 2019 – 3 Dec 2026Contributions4.1Ksince Mar 2019Last 12 months1.2KcontributionsCommits2.5Kpublic repositoriesCurrent streak23 dayssince 10 NovLongest streak41 days7 Apr – 17 May 2025Contributionsper month, Dec 2025 – Nov 2026050100150200Dec 2025: 53 contributionsJan 2026: 94 contributionsFeb 2026: 72 contributionsMar 2026: 117 contributionsApr 2026: 97 contributionsMay 2026: 82 contributionsJun 2026: 123 contributionsJul 2026: 146 contributionsAug 2026: 57 contributionsSep 2026: 113 contributionsOct 2026: 94 contributionsNov 2026: 162 contributions162Dec 2025Nov 2026Languages by commitscommits per repository languageR: 1,781 commits (71.8%)Python: 267 commits (10.8%)HTML: 205 commits (8.3%)TeX: 155 commits (6.3%)Shell: 71 commits (2.9%)2.5KcommitsR71.8%Python10.8%HTML8.3%TeX6.3%Shell2.9%Languages by repositoriesrepositories per main languageR: 4 repositories (50%)HTML: 1 repository (12.5%)Python: 1 repository (12.5%)Shell: 1 repository (12.5%)TeX: 1 repository (12.5%)8repositoriesR50%HTML12.5%Python12.5%Shell12.5%TeX12.5%Contributions as the contribution graph of the GitHub profile counts them.rghcard · updated 3 Dec 2026

In an SVG shown in a web page, as here, each column and bar tells its month or name and its value when you point at it. A GitHub profile shows the card as an image, and so without that, as does a PNG.

What counts as a contribution

GitHub counts each of these as a contribution, on the day it happened in UTC time:

  • a commit to the default branch of a repository, or to its gh-pages branch, made with an email address of the user’s account;
  • an issue or a pull request that the user opened;
  • a review of a pull request;
  • a discussion that the user opened or answered;
  • a repository that the user created or forked.

Commits, issues, pull requests and discussions in forks do not count. GitHub’s rules have the details. Contributions to private repositories count only when the user has chosen to include their private contributions on their profile, and then only as numbers, without the names of the repositories.

The key figures

The row under the title has the key figures, each with its name above the number and what it covers under it:

Figure What it counts
Contributions All the contributions since the user joined GitHub, up to the day of the collection.
Last 12 months The contributions of the 12 full months before the month of the collection.
Commits The commits that count as contributions, in public repositories, since the user joined GitHub.
Current streak The days in a row with at least one contribution, up to the day of the collection.
Longest streak The most days in a row with at least one contribution, since the user joined GitHub.

Numbers from 1,000 on are rounded: 4.1K is about 4,100.

Last 12 months. For statistics collected on 3 December 2026, the 12 months are December 2025 to November 2026, the months of the chart under it. The number differs from the contributions “in the last year” over the contribution graph of the profile, which counts the year up to the present day and changes every day.

Commits. The commits in public repositories count, the user’s own and those of others, but not those in forks. collect_stats(include_private = TRUE) adds the commits in private repositories, and the line under the number then says “public and private”; the history, which is public on a profile, then names those repositories too.

Current streak. A streak is a run of days in a row with at least one contribution. The current streak is the one that reaches the day of the collection. That day is not over, so a day without contributions yet does not end it: example-user contributed every day from 10 November to 2 December, and not yet on 3 December, the day of the collection, so their current streak is 23 days, since 10 November. When the user contributed neither on the day of the collection nor the day before, no streak is running, and the card says “none running”.

Longest streak. The longest run of days with contributions since the user joined GitHub, with its first and last day; of two equally long, the more recent. The longest streak of example-user lasted 41 days, from 7 April to 17 May 2025. When the current streak is the longest, both show the same days.

The charts

The card has up to three charts, side by side. By default:

  • "contributions": the contributions of each of the 12 full months before the month of the collection, as columns. The busiest month has its number over its column, and the first and the last month are under the axis.
  • "commit_languages": the commits per language, as a ring. The commits in a repository count for its main language, the language that GitHub detects for most of its code: a commit to an R package counts for R, even when it changed only the README. The ring has five languages at most, the largest first, clockwise from the top, and the rest together as “Other”, in grey. Each language has the colour that GitHub gives it, as in the language bar of a repository, a little lighter or darker where it would fade into the card. Beside the ring, a legend gives the colour, the name and the share of each language, in the order of the ring, and the middle of the ring the total.
  • "languages": how many repositories of the user have each main language, in the same kind of ring, as on the statistics card.

panels chooses one to three charts, from these and those of the statistics card and the other cards, which Draw the cards in R lists in one table. The fewer, the wider:

contributions_card(stats, "rghcard-contributions.svg",
                   panels = c("contributions", "top_starred"))
GitHub contributions of example-user Contributions: 4.1K (since Mar 2019), Last 12 months: 1.2K (contributions), Commits: 2.5K (public repositories), Current streak: 23 days (since 10 Nov), Longest streak: 41 days (7 Apr – 17 May 2025), 14 Mar 2019 – 3 Dec 2026.example-user· GitHub contributions14 Mar 2019 – 3 Dec 2026Contributions4.1Ksince Mar 2019Last 12 months1.2KcontributionsCommits2.5Kpublic repositoriesCurrent streak23 dayssince 10 NovLongest streak41 days7 Apr – 17 May 2025Contributionsper month, Dec 2025 – Nov 2026050100150200Dec 2025: 53 contributionsJan 2026: 94 contributionsFeb 2026: 72 contributionsMar 2026: 117 contributionsApr 2026: 97 contributionsMay 2026: 82 contributionsJun 2026: 123 contributionsJul 2026: 146 contributionsAug 2026: 57 contributionsSep 2026: 113 contributionsOct 2026: 94 contributionsNov 2026: 162 contributions162Dec 2025Nov 2026Most starred repositoriesstarstidysurveytidysurvey: 48 stars48plotkitplotkit: 23 stars23shiny-weathershiny-weather: 12 stars12workshop-2026workshop-2026: 7 stars7pyscriptspyscripts: 5 stars5Contributions as the contribution graph of the GitHub profile counts them.rghcard · updated 3 Dec 2026

Theme, title and size

theme, title, width and file work as on the statistics card:

contributions_card(stats, "rghcard-contributions-light.svg",
                   theme = "light")
GitHub contributions of example-user Contributions: 4.1K (since Mar 2019), Last 12 months: 1.2K (contributions), Commits: 2.5K (public repositories), Current streak: 23 days (since 10 Nov), Longest streak: 41 days (7 Apr – 17 May 2025), 14 Mar 2019 – 3 Dec 2026.example-user· GitHub contributions14 Mar 2019 – 3 Dec 2026Contributions4.1Ksince Mar 2019Last 12 months1.2KcontributionsCommits2.5Kpublic repositoriesCurrent streak23 dayssince 10 NovLongest streak41 days7 Apr – 17 May 2025Contributionsper month, Dec 2025 – Nov 2026050100150200Dec 2025: 53 contributionsJan 2026: 94 contributionsFeb 2026: 72 contributionsMar 2026: 117 contributionsApr 2026: 97 contributionsMay 2026: 82 contributionsJun 2026: 123 contributionsJul 2026: 146 contributionsAug 2026: 57 contributionsSep 2026: 113 contributionsOct 2026: 94 contributionsNov 2026: 162 contributions162Dec 2025Nov 2026Languages by commitscommits per repository languageR: 1,781 commits (71.8%)Python: 267 commits (10.8%)HTML: 205 commits (8.3%)TeX: 155 commits (6.3%)Shell: 71 commits (2.9%)2.5KcommitsR71.8%Python10.8%HTML8.3%TeX6.3%Shell2.9%Languages by repositoriesrepositories per main languageR: 4 repositories (50%)HTML: 1 repository (12.5%)Python: 1 repository (12.5%)Shell: 1 repository (12.5%)TeX: 1 repository (12.5%)8repositoriesR50%HTML12.5%Python12.5%Shell12.5%TeX12.5%Contributions as the contribution graph of the GitHub profile counts them.rghcard · updated 3 Dec 2026

Where the numbers come from

collect_stats() reads the contributions and the commits from GitHub’s GraphQL API, the source of the contribution graph of the profile, so the two show the same numbers. The API answers any token but none without one: without a token, collect_stats() keeps the contributions, the commits and their types of the last collection that had one.

The API gives the contributions as the token sees them. The token of a GitHub Actions workflow, with which the rghcard action reads them, sees the profile as others see it: the private contributions as bare numbers, when the profile shows them. A fine-grained token of the user that reads only the traffic leaves the private contributions out, and contributions_token of collect_stats() chooses another token.

Each collection reads them whole, since the user joined GitHub, and replaces three tables of the history: contributions, one row per day,

tail(stats$contributions)
#>            date count
#> 2817 2026-11-28     4
#> 2818 2026-11-29     4
#> 2819 2026-11-30     8
#> 2820 2026-12-01     5
#> 2821 2026-12-02     8
#> 2822 2026-12-03     0

commits, one row per repository and year,

head(stats$commits)
#>   year        owner          repo private language commits
#> 1 2019 example-user    tidysurvey   FALSE        R       7
#> 2 2019 example-user       plotkit   FALSE        R       5
#> 3 2019 example-user shiny-weather   FALSE        R       1
#> 4 2019 example-user        thesis   FALSE      TeX       2
#> 5 2019 example-user workshop-2026   FALSE        R       1
#> 6 2019 example-user       website   FALSE     HTML       3

and contribution_types, the contributions of each year by type, which the activity card draws as a ring:

tail(stats$contribution_types)
#>   year commits issues pull_requests reviews repositories private
#> 3 2021     128     24            35      15            2      10
#> 4 2022     252     46            66      33            1      22
#> 5 2023     286     61            71      38            2      19
#> 6 2024     411     72           110      64            1      27
#> 7 2025     617    121           176      81            2      31
#> 8 2026     702    132           182     111            1      42

When GitHub changes its count, for example because a repository was deleted, the next card follows.