Skip to content

balcsida/gh-enterprise-contribution-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-enterprise-contribution-sync

A GitHub CLI extension that syncs your GitHub Enterprise Server contribution graph to GitHub.com — without leaking any enterprise data.

It fetches your GHES contribution calendar, creates backdated empty commits in a local repo, and pushes to a private GitHub.com repo. Your enterprise contributions then appear on your public profile.

Install

gh extension install balcsida/gh-enterprise-contribution-sync

Requires GitHub CLI authenticated to both your GHES instance and GitHub.com:

gh auth login --hostname github.example.com
gh auth login --hostname github.com

Usage

gh enterprise-contribution-sync

That's it. On first run it will:

  1. Auto-detect your GHES host, username, and account creation date
  2. Fetch your full contribution history (chunked into 1-year API windows)
  3. Create backdated empty commits via git fast-import
  4. Create a private enterprise-contributions repo on GitHub.com
  5. Push

Subsequent runs sync incrementally — only new contributions since the last run.

Preview

gh enterprise-contribution-sync --dry-run

Flags

-H, --host string       GHES hostname (auto-detected)
-u, --username string   GHES username (auto-detected)
-d, --dir string        Local repo directory (default: ~/.gh-enterprise-contribution-sync/repo)
-r, --repo string       GitHub.com repo (default: <login>/enterprise-contributions)
-a, --author string     Commit author name (auto-detected from GitHub.com)
-e, --email string      Commit author email (auto-detected from GitHub.com)
-n, --dry-run           Preview without creating commits

Privacy

  • All commits are --allow-empty — no code content
  • Commit messages are generic (contribution)
  • No project names, PR titles, or issue references
  • The target repo is created as private
  • The tool never reads enterprise source code

License

MIT

Packages

 
 
 

Contributors

Languages