-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlabel_controllers.py
37 lines (31 loc) · 966 Bytes
/
label_controllers.py
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
class Label:
@classmethod
def get_msg(self, label) -> str:
self.label = label
self.message = None
bindings = {
"--improve" : "👌 IMPROVE: ",
"--new" : "📦 NEW: ",
"--doc" : " 📖 DOC: ",
"--fix" : "🐛 FIX: ",
"--release" : "🔖 "
}
for key, value in bindings.items():
if self.label == key:
self.message = value
return self.message
@classmethod
def get_msg_from_num(self, num) -> str:
self.num = num
self.message = None
bindings = {
"-1" : "👌 IMPROVE: ",
"-2" : "📦 NEW: ",
"-3" : " 📖 DOC: ",
"-4" : "🐛 FIX: ",
"-5" : "🔖 "
}
for key, value in bindings.items():
if self.num == key:
self.message = value
return self.message