Last active
January 9, 2018 10:15
Revisions
-
mathebox revised this gist
Jan 9, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,3 +15,6 @@ bug,c5def5 blocked,cccccc discussion,c2e0c6 question,c2e0c6 good first issue,777777 PR: ready for merge,006b75 PR: wip,bfdadc -
mathebox revised this gist
Oct 12, 2016 . No changes.There are no files selected for viewing
-
mathebox revised this gist
Oct 12, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ REPO_USER=$(echo "$REPO" | cut -f1 -d /) REPO_NAME=$(echo "$REPO" | cut -f2 -d /) echo "=> Delete existing labels" LABELS_RESPONSE=$(curl -s --user "$USER:$PASS" --request GET "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels") LABELS=($(echo $LABELS_RESPONSE | tr '"' '\n' | grep -e 'https://api.github.com/')) for label in "${LABELS[@]}" do -
mathebox created this gist
Oct 12, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/bin/bash echo -n "GitHub username: " read USER echo -n "GitHub password or token: " read -s PASS echo "" echo -n "GitHub Repo (e.g. foo/bar): " read REPO REPO_USER=$(echo "$REPO" | cut -f1 -d /) REPO_NAME=$(echo "$REPO" | cut -f2 -d /) echo "=> Delete existing labels" LABELS_RESPONSE=$(curl -s --user "$USER:$PASS" --include --request GET "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels") LABELS=($(echo $LABELS_RESPONSE | tr '"' '\n' | grep -e 'https://api.github.com/')) for label in "${LABELS[@]}" do curl -s --user "$USER:$PASS" --request DELETE "${label}" done echo "=> Create new labels" while read -r line || [[ -n "$line" ]]; do if [ ! -z "${line}" ]; then label_name=$(echo "$line" | cut -f1 -d ,) label_color=$(echo "$line" | cut -f2 -d ,) echo " - Create label '$label_name' with color #$label_color" data='{"name":"'$label_name'","color":"'$label_color'"}"' curl -s --user "$USER:$PASS" --request POST --data "$data" "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels" > /dev/null fi done < "$1" echo "=> Done" 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ P0: critical,e11d21 P1: urgent,f7c6c7 P2: required,eb6420 P3: important,fad8c7 P4: nice to have,fef2c0 design,c5def5 feature,c5def5 docs,c5def5 infrastructure,c5def5 refactoring,c5def5 toolkit,c5def5 new component,c5def5 performance,c5def5 bug,c5def5 blocked,cccccc discussion,c2e0c6 question,c2e0c6