Last active
February 20, 2017 22:42
-
-
Save vlucas/bac6a26d5b90e6ddae41 to your computer and use it in GitHub Desktop.
Setup New Github Project with System Labels
This file contains 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 | |
echo -n "GitHub Repo (e.g. foo/bar): " | |
read REPO | |
echo -n "GitHub Access Token: " | |
read ACCESS_TOKEN | |
echo "" | |
# Delete default labels | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/bug?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/duplicate?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/enhancement?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/help+wanted?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/invalid?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/question?access_token=$ACCESS_TOKEN" | |
curl -X DELETE "https://api.github.com/repos/$REPO/labels/wontfix?access_token=$ACCESS_TOKEN" | |
# Create labels | |
curl -X POST -d '{"name":"0 - Backlog","color":"CCCCCC"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"1 - Ready","color":"CCCCCC"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"2 - Working","color":"CCCCCC"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"3 - Done","color":"CCCCCC"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Kind: Bug","color":"fc2929"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Kind: Discussion","color":"006b75"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Kind: Enhancement","color":"84b6eb"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Kind: Task","color":"d4c5f9"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Points: 0","color":"767c01"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Points: 1","color":"767c01"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Points: 2","color":"767c01"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Points: 4","color":"767c01"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Points: 8","color":"767c01"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Prio: Critical","color":"e11d21"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Prio: High","color":"c0392b"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Prio: Medium","color":"fbca04"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Prio: Low","color":"16a085"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Admin","color":"d4c5f9"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Blocked","color":"e11d21"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Blocking","color":"eb6420"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Design Needed","color":"0052cc"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Integrations","color":"009800"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" | |
curl -X POST -d '{"name":"Tag: Questions","color":"cc317c"}' "https://api.github.com/repos/$REPO/labels?access_token=$ACCESS_TOKEN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment