{"id":18446701,"url":"https://github.com/zviryatko/github-to-azure-migration","last_synced_at":"2025-04-15T02:41:49.061Z","repository":{"id":145324827,"uuid":"329925578","full_name":"zviryatko/github-to-azure-migration","owner":"zviryatko","description":"Migrates issues, PRs and commit references from Github to Azure DevOps","archived":false,"fork":false,"pushed_at":"2021-01-19T16:37:22.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T12:57:41.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zviryatko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-15T13:53:01.000Z","updated_at":"2021-01-19T16:37:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"31acd296-12a8-4964-8c3c-4f68e501d3bd","html_url":"https://github.com/zviryatko/github-to-azure-migration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zviryatko%2Fgithub-to-azure-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zviryatko%2Fgithub-to-azure-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zviryatko%2Fgithub-to-azure-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zviryatko%2Fgithub-to-azure-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zviryatko","download_url":"https://codeload.github.com/zviryatko/github-to-azure-migration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248996887,"owners_count":21195785,"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-11-06T07:10:15.032Z","updated_at":"2025-04-15T02:41:49.054Z","avatar_url":"https://github.com/zviryatko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github to Azure DevOps migration\n\nThe main goal of this project is to migrate Issues and Commit references from Github to Azure DevOps.\n\nThings that was out of scope, but it's still possible to implement:\n - it will not sync issues between, so it's only one time migration\n - it will not create users, all related users must be creat upfront\n - it will not sync/upload attachments to Azure\n - it will not update all internal links like \"Some issue #123\" to new Azure issue, it is done partly only when old ticket referenced in new one, but not vice versa\n\nEvery failed try requires wipe on Azure DevOps, see Wipe section.\n\n## Requirements\n\n* PHP7.4 or later\n* Composer https://getcomposer.org/\n\n## Usage\n\n1. Clone repo\n2. Setup\n3. Copy target repository to Azure\n3. `php ./bin/github2azure migrate -u usermap.csv`\n\nIf it fails, see Wipe section and restart again.\n\n## Setup\n\nInstall dependencies:\n\n```shell\ncomposer install\n```\n\n```shell\ncp .env.dist .env\n```\n\nEdit `.env` and fill Github organization/repo and Azure DevOps organization and repo. \n\nPrepare users list to migrate (put only users that exists in Azure DevOps):\n\n```shell\ncp usermap.csv.dist usermap.csv\n```\n\nEdit `usermap.csv` and keep the original format: `github-username, Azure User Name \u003cazure@email.com\u003e`.\n\nIt is needed because migration of user accounts is out of scope of this migration tool.\n\nAlso Github API doesn't allow extracting real user emails, but only username.\n\n### Permissions\n\nThe api use should have next permissions allowed:\n- **General**: Suppress notifications for work item updates\n- **Boards**: Bypass rules on work item updates\n- **Boards**: Delete and restore work items\n- **Boards**: Permanently delete work items\n\n*last two needed for deleting wrongly imported issues. \n\n### Project Process\n\nThis migration script uses three types of issue types: Epic, User Story and Bug.\n\nSo Github issues migrated to referenced type by next rules:\n- Milestone \u003e Epic\n- Issue -\u003e User Story\n- Issue (with tag \"bug\") \u003e Bug\n\nMost likely you need to change Process to Agile, it can be done through Project settings \u003e General \u003e Overview \u003e Process\n\n## Copy target repository to Azure\n\n```shell\ngit remote add azure git@ssh.dev.azure.com:v3/[ORGANIZATION]/[PROJECT]/[REPO]\ngit fetch origin +refs/heads/*:refs/heads/* --prune \u0026\u0026 git push azure --mirror --force\n```\n\n## Wipe\n\nTo wipe everything go to Azure DevOps Boards \u003e Queries and create a simple query with all issue. Select all issue with CTRL+A and delete them via right click menu.\nThen go to Boards \u003e Work items \u003e Recycle Bin and again select all and click to Permanently delete.\n\nGo to Repos and at the top (breadcrumbs) click to repo name and select Manage repositories and re-create the needed repository (if it's single just rename it to some temp and create new repo with default name again and delete renamed).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzviryatko%2Fgithub-to-azure-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzviryatko%2Fgithub-to-azure-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzviryatko%2Fgithub-to-azure-migration/lists"}