This repository automatically mirrors my GitHub contribution activity from my work account nmcgrady to my personal profile.
Every day at 8AM UTC (2AM CST), a GitHub Actions workflow runs a Python script that:
- Fetches Contribution Data: Uses GitHub's GraphQL API to retrieve contribution counts from my work account (
@nmcgrady) - Creates Mirror Commits: Generates commits in this repository with timestamps matching the contribution dates
- Tracks State: Maintains a
contributions.jsonfile to track sync progress
- Language: Python 3.11+
- Dependencies: GitPython, requests
- API: GitHub GraphQL API v4
- Automation: GitHub Actions (daily cron job)
- Data Storage: JSON file for tracking sync state
sync_contributions.py- Main synchronization scriptcontributions.json- Tracks contribution data and sync state.github/workflows/sync-contributions.yml- GitHub Actions workflowrequirements.txt- Python dependencies
I maintain separate GitHub accounts for personal and work activities to keep my professional and personal development work clearly separated. However, I want my personal GitHub profile to serve as the comprehensive record of all my development activity.
By using separate accounts:
- Professional separation: Work contributions stay on the work account
- Personal branding: My personal profile shows my complete development journey
- Privacy boundaries: Work-specific code and projects remain separate
Making this synchronization code public serves three important purposes:
- Accountability: Anyone can verify that my personal contribution graph accurately reflects contributions from my other accounts
- Trust: The code demonstrates that I'm not artificially inflating my contribution counts - every commit corresponds to real development work done elsewhere
- Open source: Others can learn from and potentially adapt this approach for their own needs
This setup allows me to maintain a consistent contribution graph across multiple GitHub accounts while respecting platform guidelines and maintaining complete transparency about my development activity.