File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 lines = file .readlines ()
77
88# Parse the CODEOWNERS file to extract areas and their paths
9- areas = {}
9+ areas = []
1010sample_section_found = False
1111
1212for line in lines :
2222 path , codeowner = line .split ()
2323 if path in areas :
2424 raise ValueError (f"Path:{ path } has been found two times inside CODEOWNERS file" )
25- areas [path ] = codeowner
25+ areas .append (path )
26+
27+
28+ # Sort the areas in lexicographical order
29+ areas = sorted (areas )
2630
2731# Generate the YAML structure
2832yaml_form = {
3842 "attributes" : {
3943 "label" : "Which is the area where the sample lives?" ,
4044 "description" : "Select the area where you're experiencing the problem." ,
41- "options" : [ path for path , codeowner in areas . items ()]
45+ "options" : areas
4246 },
4347 "validations" : {
4448 "required" : True
You can’t perform that action at this time.
0 commit comments