INNER CODE UNIT · Kotlin
get_sort_priority
nekomangaorg/Neko · .github/scripts/generate_changelog.sh:31
def get_sort_priority:
get_normalized_line as $line |
if ($line | startswith("feat:")) then 0 # New Capabilities
elif ($line | startswith("fix:")) then 1 # Bug Fixes / Security
elif ($line | startswith("perf:")) then 2 # Performance
elif ($line | startswith("ref:")) then 3 # Structural
elif ($line | startswith("style:")) then 4 # Formatting
elif ($line | startswith("test:")) then 5 # Coverage
elif ($line | startswith("chore:")) then 6 # Maintenance
else 7
end;
def is_merge_commit:
(.message[0]? // "" | select(type == "string") // "") |
startswith("Merge remote-tracking branch '\''origin/main'\''");
# --- Main processing starts here ---