-
Notifications
You must be signed in to change notification settings - Fork 1
/
new_feature
executable file
·23 lines (18 loc) · 919 Bytes
/
new_feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#USER="$(git config user.email )"
#echo -n "GitHub Password: "
#read -s PASS
#REPO="$(git remote show -n origin | grep Fetch | cut -d: -f3- | cut -d. -f1)"
#LABEL_QUEUE="$(curl --user "$USER:$PASS" --include --request GET "https://api.github.com/repos/$REPO/issues/$1/labels" | grep '"name": "1 - queue"')"
#LABEL_INDEV="$(curl --user "$USER:$PASS" --include --request GET "https://api.github.com/repos/$REPO/issues/$1/labels" | grep '"name": "2 - indev"')"
set +x
git checkout master
git pull origin master
git checkout -b feature-$1 master
set -x
#if [[ ! -z $LABEL_QUEUE ]]; then
# curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$REPO/issues/$1/labels/1%20-%20queue"
#fi
#if [[ -z $LABEL_INDEV ]]; then
# curl --user "$USER:$PASS" --include --request POST --data '[{"name":"2 - indev","color":"00AAEE"}]' "https://api.github.com/repos/$REPO/issues/$1/labels"
#fi