{"id":49774401,"url":"https://github.com/rdmolony/backup-and-restore-a-github-org","last_synced_at":"2026-05-11T14:25:56.620Z","repository":{"id":301584489,"uuid":"1009698067","full_name":"rdmolony/backup-and-restore-a-github-org","owner":"rdmolony","description":"I needed to copy all of my repos, issues \u0026 PRs from one organisation to another, so I got Claude to script this for me","archived":false,"fork":false,"pushed_at":"2025-06-30T18:14:20.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T00:19:39.168Z","etag":null,"topics":["claude-code","github","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rdmolony.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,"zenodo":null}},"created_at":"2025-06-27T15:00:21.000Z","updated_at":"2025-06-30T18:14:24.000Z","dependencies_parsed_at":"2025-06-27T16:47:40.640Z","dependency_job_id":"7897b98b-876a-4610-b872-af63832d1403","html_url":"https://github.com/rdmolony/backup-and-restore-a-github-org","commit_stats":null,"previous_names":["rdmolony/backup-and-restore-a-github-org"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rdmolony/backup-and-restore-a-github-org","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmolony%2Fbackup-and-restore-a-github-org","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmolony%2Fbackup-and-restore-a-github-org/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmolony%2Fbackup-and-restore-a-github-org/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmolony%2Fbackup-and-restore-a-github-org/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdmolony","download_url":"https://codeload.github.com/rdmolony/backup-and-restore-a-github-org/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmolony%2Fbackup-and-restore-a-github-org/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32898555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["claude-code","github","python"],"created_at":"2026-05-11T14:25:55.930Z","updated_at":"2026-05-11T14:25:56.616Z","avatar_url":"https://github.com/rdmolony.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Organization Migration Tool\n\nI needed to copy all of my repos, issues \u0026 PRs from one organisation to another, so I got Claude to create a `Python` library to do this for me using the `GitHub` API.\n\n\u003e [!CAUTION]\n\u003e This has been written by `Claude` with minimal supervision by me\n\n\n## Features\n\n- ✅ **Complete Backup**: Clones all repositories with full git history\n- ✅ **Issue Migration**: Exports and recreates all issues with comments\n- ⚠️ **Pull Request Documentation**: Documents PRs as special issues (partial migration)\n- ✅ **Rate Limit Compliance**: Respects GitHub API limits (20/min, 150/hour)\n- ✅ **Proper Attribution**: Preserves original authors and timestamps\n\n## Requirements\n\n- [`python`](https://www.python.org/) \n\n\u003e[!NOTE]\n\u003e If you're into [`Nix`](https://github.com/NixOS/nix), then you'll just need one tool.\n\u003e Run ...\n\u003e ```sh\n\u003e nix develop\n\u003e ```\n\u003e ... \u0026 `Nix` will install the required tools for you by reading `flake.nix`\n\n\n## Quick Start\n\n\u003e [!NOTE]\n\u003e If you use the `GitHub` CLI, you can generate a token with `gh auth token` \u0026 replace `$GITHUB_TOKEN` below with `$(gh auth token)`\n\n```bash\n# Basic migration\npython migrate.py powerscope thalora-dev $GITHUB_TOKEN\n\n# With custom settings\npython migrate.py powerscope thalora-dev $GITHUB_TOKEN \\\n  --state-file ./my_migration.json \\\n  --issues-per-min 10 \\\n  --comments-per-min 15\n```\n\n## Resume Capability\n\nIf migration fails at any point, simply run the same command again:\n\n```bash\npython migrate.py powerscope thalora-dev $GITHUB_TOKEN\n```\n\nThe tool will:\n1. Skip completed repositories\n2. Skip completed issues within repositories  \n3. Resume adding comments from the exact comment that failed\n\n## Testing\n\n```bash\n# Run all tests\npython run_tests.py\n\n# Tests are designed to run with only standard library\n# No pytest, mock, or other dependencies needed\n```\n\n## Error Handling\n\nThe tool exits immediately on API failures but provides clear error messages and resume instructions. Common failure points:\n\n1. **Rate limits exceeded** - Wait and resume\n2. **API token issues** - Check token permissions  \n3. **Network issues** - Resume when connection restored\n4. **Repository already exists** - Skipped automatically\n\n## Requirements\n\n- Python 3.6+\n- GitHub personal access token with appropriate permissions\n- No additional packages needed","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmolony%2Fbackup-and-restore-a-github-org","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdmolony%2Fbackup-and-restore-a-github-org","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmolony%2Fbackup-and-restore-a-github-org/lists"}