Forked from rentzsch/setup github issues labels.sh
Last active
August 5, 2016 11:37
-
-
Save firstred/70656c09974992f00cad0fa8cb178644 to your computer and use it in GitHub Desktop.
Shell script to set up a GitHub Project's Issues' Labels as described in <http://rentzsch.tumblr.com/post/252878320/my-lighthouse-ticket-settings-with-colors>.WARNING: script assumes a newish project that hasn't really used labels yet. It deletes all default labels, which means DATA LOSS if you've used them for anything.
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
USER=firstred | |
PASS=mypassword | |
REPO=myrepo | |
# Delete default labels | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/wontfix" | |
# Create labels | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Advanced EU compliance","color":"0052cc"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Bug","color":"ee0701"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Doc change","color":"d4c5f9"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Duplicate","color":"cccccc"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Enhancement","color":"fbca04"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Estimate: L","color":"c5def5"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Estimate: M","color":"c5def5"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Estimate: S","color":"c5def5"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Help wanted","color":"e99695"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Invalid","color":"e6e6e6"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Needs explanation","color":"e99695"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"New feature","color":"d93f0b"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"PrestaShop 1.7","color":"df0067"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: blocker","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: critical","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: high","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: medium","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: trivial","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Priority: low","color":"1d76db"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Question","color":"cc317c"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Resolved","color":"0e8a16"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Task","color":"fef2c0"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Test","color":"c2e0c6"}' "https://api.github.com/repos/$USER/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"Wontfix","color":"ffffff"}' "https://api.github.com/repos/$USER/$REPO/labels" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment