Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save evandrocoan/64ed4d08bf71b7f08de02b6153e57fda to your computer and use it in GitHub Desktop.
Save evandrocoan/64ed4d08bf71b7f08de02b6153e57fda to your computer and use it in GitHub Desktop.

Copy GitHub labels from one repository to another

  1. https://github.com/jvandemo/copy-github-labels-cli
npm install -g copy-github-labels-cli
  1. Create a token with no/empty access:
  2. https://github.com/settings/tokens
  3. But for private repositories, the token must have full access to the repository.
copy-github-labels -t <token> <source-repo> <destination-repo>
copy-github-labels -t 9u2039vf0s9df80... evandrocoan/ITE evandrocoan/Trabalho01CG

Where can I get a token?

Check out the GitHub guide: Creating an access token for command-line use.

I'm getting an error "Unknown label: failed (Bad credentials)"

This happens when your token is not valid.

I'm getting an error "Unknown label: failed (Validation Failed)"

This happens when GitHub refuses to copy the label because it is already present in the destination repository.

I'm getting an error "Unknown label: failed (Not Found)"

This happens when the destination repository cannot be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment