gh-pma
Post-Migration Audit (PMA) Extension For GitHub CLI. Used to compare GitHub Enterprise (Server or Cloud) to GitHub Enterprise Cloud (includes Managed Users) migrations after using the GEI tool.
Will report on:
- Repositories from source exist in target
- Repository target visibilities match source
- If the following exist in source repositories:
- Secrets
- Variables
- Environments
The tool could be expanded to include other non-migratable settings (see what is & isn't migrated during a migration with GEI), and most likely will in the near future.
Planned Updates
- Add detection of:
- Codespaces Secrets
- Dependabot Secrets
- Environmen Secrets & Vars (currently just Environments are detected)
- Create an issue on the target org repository with the list of items to mitigate.
Prerequisites
Permissions Required
You will only be able to see repos your account has access too, so make sure your PATs for the source and destination are correct. Just like GEI, the tool uses GH_PAT
and GH_SOURCE_PAT
environment variables to communicate with source and target, unless you manually override with the provided flags.
Those PATs should adhere to the same scopes as GEI (see documentation).
Install
$ gh extension install mona-actions/gh-pma
Upgrade
$ gh extension upgrade pma
Usage
$ gh pma [flags]
Post-Migration Audit (PMA) Extension For GitHub CLI. Used to compare GitHub Enterprise (Server or Cloud) to GitHub Enterprise Cloud (includes Managed Users) migrations.
Usage:
gh pma [flags]
Flags:
--confirm Auto respond to confirmation prompt
--ghes-api-url string Required if migrating from GHES. The domain name for your GHES instance. For example: ghes.contoso.com (default "github.com")
--github-source-org string Uses GH_SOURCE_PAT env variable or --github-source-pat option. Will fall back to GH_PAT or --github-target-pat if not set.
--github-source-pat string
--github-target-org string Uses GH_PAT env variable or --github-target-pat option.
--github-target-pat string
-h, --help help for gh
-t, --threads int Number of threads to process concurrently. Maximum of 10 allowed. Increasing this number could get your PAT blocked due to API limiting. (default 3)
-v, --version version for gh