diff options
| author | Jose Santiago Vales Mena <[email protected]> | 2025-07-14 10:56:22 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-14 10:56:22 -0700 |
| commit | c75fc9242eaf2832dda16f56917319c0e7d7fc59 (patch) | |
| tree | 9dd56868bbd622e56295e9dccd9be217eb5ffe95 | |
| parent | 4525b224777ceab15c0f9254735e9f76c40297d9 (diff) | |
| parent | 1cef4c5c605fce55b23c51470feabe64c0ae300b (diff) | |
Merge pull request #14 from 5an7y/sample-based-issue-template
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 |
