A simple graph app that displays an aggregated calendar graph of contributions in Github and Gitlab
A simple graph app that displays the number of contributions to open source I've done.
It supports Gitlab and Github, both hosted in the cloud or in private instances. For private instances, or just accounts that have been locked down, you will need to provide an access token.
This page only supports one calendar per instance. It's single-user, and not multi-tenant at all.
Super-easy thanks to docker. Outside of docker, not hard at all.
docker run --env-file /path/to/envvars r.library.evaryont.me/evaryont/contribution-graph:latest
Outside of a container
bundle install --deployment bundle exec /usr/bin/ruby app.rb
contribution-graph requires 3 environment variables to function:
- GITLAB_HOST: Which gitlab you're pointing to. Includes protocol, e.g. 'https://gitlab.com'
- GITLAB_API_PRIVATE_TOKEN: Access token for your account. The username will be derived from it.
- GITHUB_USER: The github profile to pull calendar information about.
And I also recommend setting
RACK_ENV to 'production', but that's not
Errors can be optionally tracked via Sentry. Set
SENTRY_DSN and it'll be
There isn't much of an API. Small, yet still sorta useful:
This is the actual graph! Take the url, embed it everywhere you want. Show off your graphs!
- colors: Which color scheme to use to fill in the graph.
Returns the original data used to generate the graph. It's a dictionary of date -> count entries.
Server-supported color schemes. Each scheme is given a name.
Force the app to download the latest data and regenerate the graph. It'll do so automatically at start, but will otherwise not attempt to refresh the data on it's own. You should run an hourly cron job to keep it updated.
Licensed under the GPLv3. Copyright (C) 2017-2018 Colin Shea.