Skip to content

Instantly share code, notes, and snippets.

@roylee0704
Created June 14, 2016 02:32
Show Gist options
  • Save roylee0704/e3fa923a9724f205a252c37ca742ba06 to your computer and use it in GitHub Desktop.
Save roylee0704/e3fa923a9724f205a252c37ca742ba06 to your computer and use it in GitHub Desktop.
USER=
PASS=
REPO=
ORG=
PROJECT="$USER"
#uncomment $PROJECT if your are creating labels for organisation.
#PROJECT="$ORG"
# Delete default labels
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/bug"
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/duplicate"
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/enhancement"
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/invalid"
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/question"
#curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$PROJECT/$REPO/labels/wontfix"
# Create labels
curl --user "$USER:$PASS" --include --request POST --data '{"name":" source","color":"66aa00"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixcommitted","color":"003B84"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":" article","color":"66ccff"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"duplicate","color":"aaaaaa"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"declined","color":"83000C"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"maybe","color":"ff1177"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"contrib (easy)","color":"3f3f3f"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"feedback wanted","color":"5319e7"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority","color":"c7def8"}' "https://api.github.com/repos/$PROJECT/$REPO/labels"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment