INNER CODE UNIT · Kotlin

get_normalized_line

nekomangaorg/Neko · .github/scripts/generate_changelog.sh:15

    def get_normalized_line:
      (.message[0]? // "" | select(type == "string") // "")
      # 1. Standardize common prefixes and handle agent-specific ones (opt, perf, ref)
      | sub("^feat(ure)?/"; "feat:")
      | sub("^(fix|Fix)[:/ ]*"; "fix: ")
      | sub("^opt/"; "perf:")
      | sub("^perf/"; "perf:")
      | sub("^ref/"; "ref:")
      | sub("^(chore|fix)\\(deps\\):?"; "chore: ")
      | sub("^chore/"; "chore:")
      | sub("^style/"; "style:")
      | sub("^test/"; "test:")
      # 2. Cleanup: Ensure a single space after the colon and remove leading whitespace
      | sub("^(?<p>feat|fix|perf|ref|chore|style|test):\\s*"; "\(.p): ")
      | sub("^\\s*"; "");

    def get_sort_priority:
      get_normalized_line as $line |

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…