Is Github Contributions Calendar reflecting all efforts you do in yours on-line repositories (like Bitbucket or Gitlab)?
Probably not, but with this solution it will, at least for your efforts done on: bitbucket, and gitlab. Don’t worry if you can’t do the needed configurations on these on-line repositories, you can do it on your local git too!

First of all, why is that? The problem this solution is trying to resolve is that Github Contributions Calendar does not reflect the fact that on my daily job I use Git a lot, and that because my on-line repositories are on Bitbucket.
What is the motivation? The calendar is a good evidence that the dev has Git and Github skills, I am aware that head hunters checks that. Of course that quantity is nothing compared with quality, but why not have both, and mainly because that it is reflecting your reality. Also because to create a solution for that would be a cool invention 🤓
But how!? Here is the big picture:

Talk is cheap. Show me the code.
Linus Torvalds
The code is available here: contributions-cal. But we are going to focus more on how to reuse this solution, the step-by-step, see them more below.
Assumptions: You have an account on github, one on heroku (if you don’t, create one, it’s simple, and costless for this solution purpose). If you don’t have one neither on bitbucket nor on gitlab, you can use your local git.
Steps on Github:
On github clone https://github.com/flauberjp/contributions-cal, in a way you have a copy of it on your repository( to fork is not going to work), then copy its URL from your repository, example, supposing my github user is neo, the URL would be: https://github.com/neo/contributions-cal
Steps on Heroku:
- On heroku, create a new app. Name it this way: supposing my heroku user is neo, name it as neo-contributions-cal;
- Let’s configure our heroku application. On its details, access its Settings;
- On Settings, config the following vars: 1) my_name, this is your github name, e.g., Thomas A. Anderson; 2) my_email, this is the e-mail of your github account, example, neo@gmail.com; 3) my_user, this is your github user name, e.g. neo, 4) my_password, you github password (no worry here, although this wont’t be public at any moment, you can create a github personal access token for the command line anyway);
- More below, on Buildpacks area, add two buildpack in this order: 1st) Enter this as Buildpack: URL https://github.com/heroku/heroku-buildpack-apt; 2nd) heroku/python, this one you can select on the officially supported buildpacks list;
- Let’s configure the deploy now, select Deploy tab on your heroku app details;
- On the configuration of you app on heroku, select the deployment method as GitHub, and connect your github repository, in our example, it is neo/contributions-cal
- On Deploy tab yet, more below, on Manual deploy body, manually deploy the code located on github as an heroku app by clicking the button Deploy Branch. After awhile, you should be able to view your app.
Steps on Bitbucket (optional):
- Let’s setup a webhook, go to your online repository on Bitbucked.
- On your repository, access Settings menu, then Webhooks, then click the button Add webhook
- On the configuration of the webhook, set the Title to “neo’s github”.
- Set the URL to https://neo-contributions-cal.herokuapp.com/request
The first part is the URL of your app, then the path request instruct our app to perform an update on github repository - Continuing the configuration, mark the SSL / TLS checkbox, so we skip certificate verification. The Repository push is our trigger, selected by default.
- Now, just save and we are read to test our solution.
Steps on Gitlab (optional):
- Let’s setup a webhook, go to your online repository on GitLab.
- Go Settings -> Integrations
- Set the URL to https://neo-contributions-cal.herokuapp.com/request
The first part is the URL of your app, then the path request instruct our app to perform an update on github repository.
The Push events is our trigger, selected by default. - Unmark Enable SSL verification checkbox
- Add by clicking the button Add webhook
- Now, just save and we are read to test our solution.
Steps on local Git (optional):
Sometime you don’t have access to the on-line repository to configure a hook there, so you can workaround this limitation by programming a hook on your local Git. See how:
- Let’s setup a hook, go to your local project directory, then open “.git\hooks”. The directory “.git” is hidden, and it contain files used by Git.
- Locate pre-push.sample file, do a copy, renaming it to pre-push
The extension .sample prevents it to be executed when a push command is hit. - Edit pre-push file so its content is (remember to change neo by your user always) equal to the one more below. Attention: the command below is going run the program curl , so make sure it is installed on your machine and in the path.
If on a Windows OS, like Windows 10:
#!/bin/sh
start /MIN curl -d “{\”author\”:\”neo\”, \”hash\”:\”= = = =\”, \”summary\”:\”push done from local git\”}” -H “X-Git-Event: Push Hook” -H “Content-Type: application/json” -X POST https://neo-contributions-cal.herokuapp.com/request
exit 0
If on a Linux OS, like Ubuntu:
#!/bin/sh
curl -d ‘{“author”:”neo”, “hash”:”= = = =”, “summary”:”push done from local git”}’ -H ‘X-Git-Event: Push Hook’ -H ‘Content-Type: application/json’ -X POST https://neo-contributions-cal.herokuapp.com/request
exit 0 - Now, we are ready to test our solution.
Testing the solution:
- To test this solution perform a push on any repository where you configured the webook or local hook.
- Then go to github, and check that a push occurred there too, an evidence that you just used your Git skills.