@@ -6,6 +6,7 @@ function getHelp {
6
6
--help, -h Show this help
7
7
--user, -u GitHub username
8
8
--password, -p GitHub password
9
+ --file, -f Set label file
9
10
--verbose, -v Details process
10
11
11
12
Usage:
38
39
elif [[ $i == ' --user' ]] || [[ $i == ' -u' ]]; then
39
40
GITHUB_USERNAME=${args[$counter + 1]}
40
41
readed_counter=$[$readed_counter + 1]
41
- elif [[ $i == ' --password' ]] || [[ $i == ' -p' ]]; then
42
+ elif [[ $i == ' --password' ]] || [[ $i == ' -p' ]]; then
42
43
GITHUB_PASSWORD=${args[$counter + 1]}
43
44
readed_counter=$[$readed_counter + 1]
45
+ elif [[ $i == ' --file' ]] || [[ $i == ' -f' ]]; then
46
+ LABEL_FILE=${args[$counter + 1]}
47
+ readed_counter=$[$readed_counter + 1]
44
48
elif [[ $i == ' --verbose' ]] || [[ $i == ' -v' ]]; then
45
49
VERBOSE=1
46
50
else
@@ -79,7 +83,10 @@ invalid
79
83
question
80
84
wontfix'
81
85
82
- LABELS=' Category: Backend,c2e0c6
86
+ if [ -f $LABEL_FILE ]; then
87
+ LABELS=" $( cat ${LABEL_FILE} ) "
88
+ else
89
+ LABELS=' Category: Backend,c2e0c6
83
90
Category: Business/Meetings,0e8a16
84
91
Category: DevOps,fef2c0
85
92
Category: Frontend,bfdadc
@@ -108,6 +115,7 @@ Type: Bug,fc2929
108
115
Type: Improvement,84b6eb
109
116
Type: New feature,0052cc
110
117
Type: Sub-task,ededed'
118
+ fi
111
119
112
120
if [[ " $VERBOSE " == 1 ]]; then
113
121
echo " Removing default labels"
@@ -141,4 +149,3 @@ while read -r label; do
141
149
echo " Label \" $label_name \" created"
142
150
fi
143
151
done <<< " $LABELS"
144
-
0 commit comments