Skip to content

Commit

Permalink
case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
trueberryless committed Nov 25, 2024
1 parent ed870e8 commit 9c5c1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sort-repo-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
def sort_files_by_target_path(files):
def sort_key(file_obj):
target_path = file_obj.get("targetPath", "")
target_path = file_obj.get("targetPath", "").lower()
components = target_path.split('/')
is_directory = target_path.endswith('/')
return (components, not is_directory)
return sorted(files, key=lambda f: (sort_key(f), f["targetPath"]))
return sorted(files, key=lambda f: (sort_key(f), f["targetPath"].lower()))
input_file = "repos.json"
Expand Down

0 comments on commit 9c5c1f1

Please sign in to comment.