Created
May 28, 2016 10:22
-
-
Save alasarr/46624682dcf159e08291b092ffc76452 to your computer and use it in GitHub Desktop.
GitHub API create label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER=XXX | |
ORG=XXX | |
PASS=XXX | |
REPO=XXX | |
# Delete default labels | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/bug" | |
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/duplicate" | |
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/enhancement" | |
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/invalid" | |
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/question" | |
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ORG/$REPO/labels/wontfix" | |
# Create labels | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"bug","color":"f99849"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"feature","color":"d4c5f9"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"uix","color":"d4c5f9"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"inprogress","color":"b1ea98"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"inreview","color":"0e8a16"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority:inmediate","color":"fc2929"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority:high","color":"0052cc"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority:medium","color":"6e86a9"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority:low","color":"b5c2d9"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"uix","color":"d4c5f9"}' "https://api.github.com/repos/$ORG/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"icebox","color":"fbca04"}' "https://api.github.com/repos/$ORG/$REPO/labels" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment