A GitHub CLI extension that monitors the progress of GitHub Organization migrations with a real-time terminal UI dashboard.
This extension provides a comprehensive view of repository migrations, supporting both legacy migrations and the new GitHub Enterprise Importer (GEI) migrations.
- Real-time Monitoring: Live dashboard that updates migration status every 60 seconds
- Multi-State Tracking: Monitors migrations across Queued, In Progress, Succeeded, and Failed states
- Legacy Support: Compatible with both legacy migrations and GEI migrations
- Interactive UI: Keyboard navigation and focus switching between migration states
- Error Details: Detailed failure reasons for failed migrations
Install the extension using the GitHub CLI:
gh extension install mona-actions/gh-migration-monitorMonitor migrations for a GitHub organization:
gh migration-monitor --organization myorg# Monitor with a specific GitHub token
gh migration-monitor --organization myorg --github-token ghp_xxxxxxxxxxxx
# Monitor legacy migrations
gh migration-monitor --organization myorg --legacy
# Short flags
gh migration-monitor -o myorg -t ghp_xxxxxxxxxxxx -l| Flag | Short | Description | Required |
|---|---|---|---|
--organization |
-o |
GitHub organization to monitor | ✅ |
--github-token |
-t |
GitHub personal access token | ❌* |
--legacy |
-l |
Monitor legacy migrations | ❌ |
*The GitHub token can also be provided via the GHMM_GITHUB_TOKEN environment variable.
The extension supports configuration through multiple sources:
Set these environment variables to avoid passing flags:
export GHMM_GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
export GHMM_GITHUB_ORGANIZATION="myorg"
export GHMM_ISLEGACY="true" # for legacy migrationsCreate a configuration file at ~/.gh-migration-monitor/config.yaml:
github:
token: 'ghp_xxxxxxxxxxxx'
organization: 'myorg'
migration:
is_legacy: false
output:
format: 'table'
quiet: falseOnce the dashboard is running, use these keyboard shortcuts:
| Key | Action |
|---|---|
q |
Focus on Queued migrations |
i |
Focus on In Progress migrations |
s |
Focus on Succeeded migrations |
f |
Focus on Failed migrations |
x |
Exit the application |
The dashboard categorizes migrations into four states:
QUEUED: Migration is waiting to startWAITING: Migration is in the queue
IN_PROGRESS: Migration is actively runningPREPARING: Migration is being preparedPENDING: Migration is pendingMAPPING: Migration is mapping resourcesARCHIVE_UPLOADED: Archive has been uploadedCONFLICTS: Migration has conflicts to resolveREADY: Migration is ready to proceedIMPORTING: Migration is importing data
SUCCEEDED: Migration completed successfullyUNLOCKED: Repository has been unlockedIMPORTED: Migration has been imported
FAILED: Migration failedFAILED_IMPORT: Import process failed
- GitHub CLI installed and authenticated
- GitHub personal access token with appropriate permissions:
- For GEI migrations:
read:org,repo - For legacy migrations:
read:org,repo,admin:org
- For GEI migrations:
"GitHub token is required"
- Ensure you have set
GHMM_GITHUB_TOKENenvironment variable or passed--github-tokenflag - Verify your token has the required permissions
"Organization not found"
- Check the organization name is correct
- Ensure your token has access to the organization
"API rate limit exceeded"
- The extension includes built-in rate limiting, but if you hit limits, wait a few minutes
Enable verbose logging by setting:
export GHMM_DEBUG=trueWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License.
Note: This tool is inspired by github-migration-monitor and provides enhanced functionality with a modern terminal UI.