Cloning GitHub Issue Labels via CLI
Managing issue taxonomies across discrete version control repositories often involves redundant manual data entry. While GitHub provides an interface for standard label management, migrating an established schema of issue labels—complete with their designated hexadecimal color codes and descriptions—requires external tooling.
The official GitHub Command Line Interface (CLI) provides a direct vector for this operation via the gh label clone subroutine. This command extracts the complete label schema from a specified source repository and provisions it against the target destination in a single authenticated transaction [1].
Cloning syntax
$ gh label clone simonw/datasette --repo my-org/my-new-repo
Execution of this command strictly requires the gh binary to be authenticated with appropriate write scopes for the destination repository.
References
- Willison, S. "Creating GitHub Labels". Available: https://til.simonwillison.net/github-actions/creating-github-labels.