Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save menor/62e98c53ffcbfbcd1f3ec69a8bdc7002 to your computer and use it in GitHub Desktop.

Select an option

Save menor/62e98c53ffcbfbcd1f3ec69a8bdc7002 to your computer and use it in GitHub Desktop.

Revisions

  1. @hubertursua hubertursua revised this gist May 15, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -18,10 +18,10 @@ REPO_NAME=$(echo "$REPO" | cut -f2 -d /)
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/bug"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/duplicate"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/enhancement"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/help+wanted"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/invalid"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/question"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/wontfix"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/help+wanted"

    # Create labels
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Bug","color":"e74c3c"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
  2. @hubertursua hubertursua revised this gist May 15, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,7 @@ curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/rep
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/invalid"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/question"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/wontfix"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/help+wanted"

    # Create labels
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Bug","color":"e74c3c"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
  3. @hubertursua hubertursua revised this gist May 15, 2014. 1 changed file with 26 additions and 20 deletions.
    46 changes: 26 additions & 20 deletions setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,30 @@
    USER=rentzsch
    PASS=mypassword
    REPO=mogenerator
    #!/bin/bash

    echo -n "GitHub User: "
    read USER

    echo -n "GitHub Password: "
    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 /)

    # 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"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/bug"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/duplicate"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/enhancement"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/invalid"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/question"
    curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels/wontfix"

    # Create labels
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"accepted","color":"66aa00"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixcommitted","color":"003B84"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"bluesky","color":"66ccff"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"duplicate","color":"aaaaaa"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"declined","color":"83000C"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"new","color":"ff1177"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixreleased","color":"3f3f3f"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"resolved","color":"3f3f3f"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"wishlist","color":"66Aa00"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Bug","color":"e74c3c"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Enhancement","color":"9b59b6"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Feature Request","color":"3498db"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Suport","color":"95a5a6"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"Testing","color":"f1c40f"}' "https://api.github.com/repos/$REPO_USER/$REPO_NAME/labels"
  4. @rentzsch rentzsch revised this gist Jan 23, 2013. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -11,14 +11,14 @@ curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/rep
    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":"accepted","color":"66aa00"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixcommitted","color":"003B84"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"bluesky","color":"66ccff"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"duplicate","color":"aaaaaa"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"declined","color":"83000C"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"new","color":"ff1177"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixreleased","color":"3f3f3f"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"resolved","color":"3f3f3f"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"wishlist","color":"66Aa00"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"accepted","color":"66aa00"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixcommitted","color":"003B84"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"bluesky","color":"66ccff"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"duplicate","color":"aaaaaa"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"declined","color":"83000C"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"new","color":"ff1177"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixreleased","color":"3f3f3f"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"resolved","color":"3f3f3f"}' "https://api.github.com/repos/$USER/$REPO/labels"
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"wishlist","color":"66Aa00"}' "https://api.github.com/repos/$USER/$REPO/labels"
  5. @rentzsch rentzsch revised this gist Jan 15, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,15 @@ USER=rentzsch
    PASS=mypassword
    REPO=mogenerator

    # 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":"accepted","color":"66aa00"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' 'https://api.github.com/repos/$USER/$REPO/labels'
  6. @rentzsch rentzsch created this gist Jan 15, 2013.
    22 changes: 22 additions & 0 deletions setup github issues labels.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    USER=rentzsch
    PASS=mypassword
    REPO=mogenerator

    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"

    curl --user "$USER:$PASS" --include --request POST --data '{"name":"accepted","color":"66aa00"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"reproduced","color":"006600"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"cantreproduce","color":"996361"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixcommitted","color":"003B84"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"bluesky","color":"66ccff"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"duplicate","color":"aaaaaa"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"declined","color":"83000C"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"new","color":"ff1177"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"fixreleased","color":"3f3f3f"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"resolved","color":"3f3f3f"}' 'https://api.github.com/repos/$USER/$REPO/labels'
    curl --user "$USER:$PASS" --include --request POST --data '{"name":"wishlist","color":"66Aa00"}' 'https://api.github.com/repos/$USER/$REPO/labels'