Skip to content

Instantly share code, notes, and snippets.

@caarlos0
Created May 22, 2020 19:58
Show Gist options
  • 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