A few years ago I encountered the GitHub profile of someone who created a fake commit history in GitHub in order to write their username in their GitHub contribution graph:
<imagine a cool picture of it here because i can’tfindone🥺>
Since my contribution graph usually looks like this:
< tumbleweed emoji >
...I’ve always had it in the back of my mind as something I’d like to take a stab at. Primarily for the sake of solving an interesting problem, but also to mess with recruiters who seem to believe contribution activity strongly correlates with programming ability (said with chip on shoulder as someone required to use a separate GitHub account for work).
Since taking a burnout-induced leave-of-absence, I’ve had some time to explore the problem, which has led to the creation of...
tbrockman/github-paint
a GitHub Action which--given a string, a GitHub API token, and any optional parameters--performs the necessary calculations to create the right number of commits on the right dates to render something like the following in your GitHub profile:
Since it’s a GitHub Action, you can also configure it to run periodically such that your contribution graph always shows the text in the same position as time goes on.
The whole thing is a Python Typer-CLI that primarily makes calls to gh
and git
, orchestrating the following:
width = number_of_weeks_in_timeframe
and height = 7
.git
repository, for each day (in the appropriate chronological order--though this doesn’t seem to matter much to GitHub), we forge the necessary number of commits on each date (since git
allows setting arbitrary commit timestamps).So far, it seems to work pretty well, but it’s not super battle-tested. if you run into issues feel free to create a pull request in the repository: https://github.com/tbrockman/github-paint.
✌️