Skip to content

Instantly share code, notes, and snippets.

@caarlos0
Created May 22, 2020 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caarlos0/19227b93c364ae3581fd197746328ac0 to your computer and use it in GitHub Desktop.
Save caarlos0/19227b93c364ae3581fd197746328ac0 to your computer and use it in GitHub Desktop.
#!/bin/sh
for size in XL XXL XS S M L; do
curl -sf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/kubernetes/kubernetes/labels/size/$size" |
jq '. | { "name": .name, "color": .color, "description": .description }' |
curl -sfXPOST -d @- -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$REPO/labels
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment