{"id":15048207,"url":"https://github.com/github/gh-migration-analyzer","last_synced_at":"2025-08-16T05:31:50.653Z","repository":{"id":40477609,"uuid":"437060208","full_name":"github/gh-migration-analyzer","owner":"github","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-19T00:04:10.000Z","size":700,"stargazers_count":65,"open_issues_count":10,"forks_count":21,"subscribers_count":194,"default_branch":"main","last_synced_at":"2024-12-04T13:11:35.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null}},"created_at":"2021-12-10T17:25:30.000Z","updated_at":"2024-09-23T14:56:11.000Z","dependencies_parsed_at":"2023-09-25T03:52:41.800Z","dependency_job_id":null,"html_url":"https://github.com/github/gh-migration-analyzer","commit_stats":{"total_commits":42,"total_committers":13,"mean_commits":3.230769230769231,"dds":0.5238095238095238,"last_synced_commit":"0b4821eb1b9ee68ca139f87ebb75f02782e24255"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-migration-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-migration-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-migration-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-migration-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/gh-migration-analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230013033,"owners_count":18159602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:09:15.634Z","updated_at":"2024-12-16T19:13:54.403Z","avatar_url":"https://github.com/github.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Migration Analyzer\n\nThe Migration Analyzer is a command-line (cli) utility tool that helps customers migrating repositories to GitHub plan for and size their migration in terms. The tool currently supports migrations from Azure DevOps and GitHub Cloud as a source to GitHub Cloud as a destination. \n\nThe tool is for use alongside GitHub's Enterprise Importer (GEI). It is a self-service tool for customers to gauge how much data they will need to migrate without having to do a dry run migration with GEI itself. \n## Environment\n\nThe tool runs in a [Node.js](https://nodejs.org/) runtime environment.  It requires version 14 or greater. \n## Installation\n\nUse the command ```cd \u003cpathname of desired parent directory\u003e \u0026\u0026 git clone https://github.com/github/gh-migration-analyzer.git``` to change to the desired parent directory and install the tool. \n\n## Personal Access Tokens\n\nYou will need to generate a Personal Access Token (PAT) within your source (Azure DevOps or GitHub). The following scopes are required:\n\n* For Azure DevOps: `read` for `Code`.\n* For GitHub Cloud: `repo`.  \n\n## Dependencies\n\nUse the command ```cd \u003cpathname of migration analyzer directory\u003e \u0026\u0026 npm install``` to change to your ```migration-analyzer``` directory.  This will install the following project dependencies:\n\n- [commander](https://www.npmjs.com/package/commander)\n- [csv-writer](https://www.npmjs.com/package/csv-writer)\n- [node-fetch](https://www.npmjs.com/package/node-fetch)\n- [ora](https://www.npmjs.com/package/ora)\n- [p-limit](https://www.npmjs.com/package/p-limit)\n- [prompts](https://www.npmjs.com/package/prompts)\n\n## Usage\n\nUsage information about the tool is available with the help command. \n````\nnode src/index.js help\n````\n\nFetch Azure DevOps organization metrics and write to CSV. \n````\nnode src/index.js ADO-org [options]\n\nOptions:\n  -p, --project \u003cproject name\u003e Azure DevOps project name (can pass either project or organization, not necessary to pass both)\n  -o, --organization \u003corganization\u003e Azure DevOps organization name\n  -t, --token \u003cPAT\u003e Azure DevOps personal access token\n  -h, --help Help command for Azure DevOps options\n````\n\nFetch GitHub Organization Metrics and write to CSV\n````\nnode src/index.js GH-org [options]\n\nOptions:\n  -o, --organization \u003corganization\u003e GitHub organization name (required)\n  -t, --token \u003cPAT\u003e GitHub personal access token\n  -s, --server \u003cGRAPHQL URL\u003e GraphQL endpoint for a GHES instance. \n  -a, --allow-untrusted-ssl-certificates Allow connections to a GitHub API endpoint that presents a SSL certificate that isn't issued by a trusted CA\n  -h, --help Help command for GitHub options\n\n````\n\nYou can alternatively export your PAT as environment variable if you do not want to pass it in with the command. \n\n````export GH_PAT=\u003cPAT\u003e```` or ````export ADO_PAT=\u003cPAT\u003e````\n\nThe tool will export CSV files a new directory within the project's root directory. If GitHub is the source, the tool will export two CSV files: one containing a list of repositories with the number of Pull Requests, Issues, Projects, and whether wikis are enabled. The other will contain organization-level rollup metrics (number of repositories, pull requests, issues, and projects). If Azure DevOps is the source, the CSV will list each project, and the repositories and pull requests in each. \n\n## Usage for GitHub Enterprise Server (GHES)\nThe tool can be run against a GHES 3.4 or newer to gather migration statistics. Clone this repository onto a computer that has access to your GHES instance's web portal. Ensure that you've run the installation steps described earlier in this readme. You'll need to supply the GraphQL endpoint for your GHES instance in the `-s` option. You can learn how to get this endpoint in the [forming calls with GraphQL](https://docs.github.com/en/enterprise-server@3.4/graphql/guides/forming-calls-with-graphql#the-graphql-endpoint) documentation GitHub provides. The final command will be structured like the below example. \n\n```\nnode src/index.js GH-org -o \u003cORG Name\u003e -s \u003cGHES GraphQL Endpoint\u003e\n```\n\n## Project Roadmap\n\nThe current areas of focus for the project are:\n- [ ] Achieving complete code coverage with unit tests\n- [ ] Allowing the command ```migration-analyzer``` to be run instead of ```node src/index.js```\n- [ ] Adding error handling for when an ADO repository contains a large binary that exceeds the size limit\n\nIn the future, the following areas of focus will be added:\n- [ ] Create a new way to distribute and run the tool, such as a Docker image\n\n## Contributions\n\nThis application was originally written by Aryan Patel ([@arypat](https://github.com/AryPat)) and Kevin Smith ([@kevinmsmith131](https://github.com/kevinmsmith131)). See [Contributing](CONTRIBUTING.md) for more information on how to get involved. \n\n## Support\n\nThis is a community project *which is not supported by GitHub Support*. \n\nPlease engage with the community via an [issue](https://github.com/github/gh-migration-analyzer/issues) if you need help, and PRs are always welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-migration-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgh-migration-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-migration-analyzer/lists"}