Skip to content

GitHub CLI extension to generate GitHub repository migrations

Notifications You must be signed in to change notification settings

tspascoal/gh-repo-export

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

$ gh repo-export tinyfists test-1 test-2 test-3
Start migration for repositories: test-1 test-2 test-3
Monitoring migration 1704841 state:  exporting
Monitoring migration 1704841 state:  exporting
Monitoring migration 1704841 state:  exporting
Monitoring migration 1704841 state:  exported
Downloading migration 1704841 archive to migration_archive-1704841.tar.gz

gh-repo-export

A gh extension to generate GitHub repository migrations.

Quickstart

  1. Download and install jq
  2. gh extension install andyfeller/gh-repo-export
  3. gh repo-export <organization> <repo> ...
  4. Profit! πŸ’° πŸ’Έ πŸ€‘ πŸ’Έ πŸ’°

Usage

Note gh-repo-export requires the use of coarse-grained v1 PAT token with repo and admin:org scopes.

$ gh repo-export --help

Bulk exports a list of Git repositories from an organization

USAGE
  gh-repo-export [options] <organization> <repo1> <repo2> ...

FLAGS
      --archive=string                Archive file (don't include the .tar.gz extension) (default: migration_archive-<migration_id>.tar.gz)
  -d, --debug                         Enable debugging
      --exclude-attachments           Indicates attachments should be excluded from the migration
      --exclude-git-data              Indicates git data should be excluded from the migration
      --exclude-metadata              Indicates metadata should be excluded from the migration
      --exclude-owner-projects        Indicates projects owned by the organization or users should be excluded from the migration
      --exclude-releases              Indicates releases should be excluded from the migration
      --hostname=string               Hostname of the GitHub instance to authenticate with
      --lock-repositories             Indicates repositories should be locked (to prevent manipulation) while migrating data      

Setup

Like any other gh CLI extension, gh-repo-export is trivial to install or upgrade and works on most operating systems:

About

GitHub CLI extension to generate GitHub repository migrations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%