-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlabelsGenerate.sh
57 lines (47 loc) · 2.01 KB
/
labelsGenerate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /usr/bin/env bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source $SCRIPT_DIR/include.sh
################################################
# Change these parameters
REPO_TYPE="groups" # groups or projects
REPO_ID=13
################################################
# Colors
RED="#FC6868"
ORANGE="#FFC791"
LAVENDER="#F4E5F9"
GRAY="#F1F1F1"
BLUE="#92D2F0"
GRASS="#B8E881"
SKY="#E4F1F2"
function createLabel {
name=$1
color=$2
description=$3
priority=$4
curl --data "name=$name&color=$color&description=$description&priority=$priority" \
--header "PRIVATE-TOKEN: $TOKEN_PERSONAL" \
--insecure \
"$GITLAB_URL/api/v4/$REPO_TYPE/$REPO_ID/labels"
}
# Label Classifiers are alphabetical
# so the most important classifiers appear earlier
createLabel "Impt: 1" $RED "High Visibility and Urgent" 1
createLabel "Impt: 2" $ORANGE "Moderate Visibility and Urgent" 2
createLabel "Impt: 3" $LAVENDER "Low Visiblility but Impactful" 3
createLabel "Impt: 4" $GRAY "Good-to-Have" 4
createLabel "Epic" $GRASS "Grouping of Issues, e.g. User Stories" "null"
createLabel "Issue: Bug" $RED "Unintended behavior" "null"
createLabel "Issue: Dep" $BLUE "Dependencies for software, runtimes, modules, etc." "null"
createLabel "Issue: Feature" $GRASS "Addition of something that didn't exist" "null"
createLabel "Issue: Maintenance" $BLUE "QoL changes, e.g. refactoring, documenting, testing" "null"
createLabel "Issue: Question" $BLUE "Questions or Discussions" "null"
createLabel "Status: Blocked" $LAVENDER "" "null"
createLabel "Status: Duplicate" $LAVENDER "" "null"
createLabel "Status: Unreproducible" $LAVENDER "" "null"
createLabel "Status: WontFix" $LAVENDER "" "null"
createLabel "Whr: Env" $SKY "E.g. HW, OS, Env Vars" "null"
createLabel "Whr: Frontend" $SKY "E.g. Client-Facing" "null"
createLabel "Whr: Backend" $SKY "E.g. Pipeline, Services, Code, Algorithms" "null"
createLabel "Whr: Data" $SKY "E.g. Database, Data Source" "null"
createLabel "Whr: DevOps" $SKY "E.g. Build, Test, Deploy, Monitoring" "null"