File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 6
6
from models import Group , Label
7
7
8
8
9
+ def get_groups ():
10
+ """
11
+ Get the list of label groups.
12
+ @return: the list of label groups.
13
+ """
14
+
15
+ labels_dict = load_json_from_file ("labels" )
16
+ groups = []
17
+ for group_info in labels_dict ["groups" ]:
18
+ group = Group (** group_info )
19
+ label_names = group_info .pop ("labels" , [])
20
+ groups .append (group )
21
+ for label_info in label_names :
22
+ Label (** label_info , group = group )
23
+ return groups
24
+
25
+
9
26
def get_standard_labels ():
10
27
"""
11
28
Get the list of standard labels that apply to every repository.
@@ -102,4 +119,4 @@ def get_labels():
102
119
return standard_labels , repo_specific_labels
103
120
104
121
105
- __all__ = [get_labels ]
122
+ __all__ = [get_labels , get_groups ]
You can’t perform that action at this time.
0 commit comments