From 1cef4c5c605fce55b23c51470feabe64c0ae300b Mon Sep 17 00:00:00 2001 From: 5an7y Date: Mon, 14 Jul 2025 10:55:09 -0700 Subject: Sort the area in the issue template --- .github/ISSUE_TEMPLATE/sample_issue_generator.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/sample_issue_generator.py b/.github/ISSUE_TEMPLATE/sample_issue_generator.py index bdfc2b4b..964a8f1d 100644 --- a/.github/ISSUE_TEMPLATE/sample_issue_generator.py +++ b/.github/ISSUE_TEMPLATE/sample_issue_generator.py @@ -6,7 +6,7 @@ with open("../CODEOWNERS", "r") as file: lines = file.readlines() # Parse the CODEOWNERS file to extract areas and their paths -areas = {} +areas = [] sample_section_found = False for line in lines: @@ -22,7 +22,11 @@ for line in lines: path, codeowner = line.split() if path in areas: raise ValueError(f"Path:{path} has been found two times inside CODEOWNERS file") - areas[path] = codeowner + areas.append(path) + + +# Sort the areas in lexicographical order +areas = sorted(areas) # Generate the YAML structure yaml_form = { @@ -38,7 +42,7 @@ dropdown = { "attributes": { "label": "Which is the area where the sample lives?", "description": "Select the area where you're experiencing the problem.", - "options": [path for path, codeowner in areas.items()] + "options": areas }, "validations": { "required": True -- cgit v1.3.1