diff options
| author | 5an7y <[email protected]> | 2025-07-14 10:55:09 -0700 |
|---|---|---|
| committer | 5an7y <[email protected]> | 2025-07-14 10:55:09 -0700 |
| commit | 1cef4c5c605fce55b23c51470feabe64c0ae300b (patch) | |
| tree | aebad65708de006eed54f7f1549f81af92b4a352 | |
| parent | 69b234c33f286e943da75a3072ead937e32a61e0 (diff) | |
Sort the area in the issue template
| -rw-r--r-- | .github/ISSUE_TEMPLATE/sample_issue_generator.py | 10 |
1 files 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 |
