Analyze commit activity for any GitHub repository with interactive dashboards. This project provides automation scripts to extract Git history and generate Rill analytics in just a few commands.
See live demo → | Read the full guide →
This project uses:
- PyDriller to extract commit data from Git repositories
- Automation scripts (
download_commits.py,generate_project.py) to scrape Git history and generate Rill project files - Cloud storage (GCS) or local files for data
- Rill for fast, interactive analytics dashboards
# 1. Clone and install
git clone https://github.com/rilldata/rill-examples.git
cd rill-examples/rill-github-analytics
poetry install
# 2. Generate Rill files
python generate_project.py your-org/your-repo --gcs --bucket gs://your-bucket/github-analytics
# 3. Download and upload data
python download_commits.py your-org/your-repo --gcs --bucket gs://your-bucket/github-analytics
# 4. Deploy
rill deployThis project includes two scripts to streamline setup:
Generates all Rill files (sources, models, metrics, dashboards) for a repository:
python generate_project.py owner/repo --gcs --bucket gs://bucket/path
python generate_project.py owner/repo --local # For local testingExtracts commit history and saves to cloud storage:
python download_commits.py owner/repo --gcs --bucket gs://bucket/path
python download_commits.py owner/repo --local # For local testingBoth scripts require explicit storage flags (--gcs or --local).
Generated files for each repository:
sources/{repo}_commits_source.yaml– Data source for commitssources/{repo}_modified_files.yaml– Data source for file changesmodels/{repo}_commits_model.sql– SQL transformationsmetrics/{repo}_commits_metrics.yaml– Metrics definitionsdashboards/{repo}_commits_explore.yaml– Explore dashboard
For private repositories: Set GITHUB_TOKEN environment variable with a fine-grained personal access token.
For GCS: Set GOOGLE_APPLICATION_CREDENTIALS to your service account key path. See GCS credentials guide.
- Full Tutorial – Step-by-step guide with prerequisites and examples
- Rill Documentation – Learn more about Rill
- Discord Community – Get help and share your dashboards