Last active
September 3, 2020 20:18
-
-
Save JamesKingdom/5811a889de8a17753602164bb54a9300 to your computer and use it in GitHub Desktop.
GitHub label creator
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
USER=username | |
PASS=password | |
ACC=account | |
REPO=repo | |
# Delete default labels | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/bug" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/duplicate" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/enhancement" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/invalid" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/help%20wanted" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/question" | |
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$ACC/$REPO/labels/wontfix" | |
# Create labels | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"bluesky","color":"1e96db"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"bug","color":"ee0701"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"chore","color":"fef2c0"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"considering","color":"cc33cc"}' "https://api.github.com/repos/$ACCR/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"core","color":"0052cc"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"enhancement","color":"006b75"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"priority","color":"0e8a16"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"question","color":"cc33cc"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"waitfor","color":"444444"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"waitfor-info","color":"444444"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"wip","color":"fbca04"}' "https://api.github.com/repos/$ACC/$REPO/labels" | |
curl --user "$USER:$PASS" --include --request POST --data '{"name":"wontfix","color":"eeeeee"}' "https://api.github.com/repos/$ACC/$REPO/labels" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment