Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

ci(release): each line of the notes opens with a mark for what it touches

Jareere0335168c127
diff --git a/.github/release-notes.sh b/.github/release-notes.sh
index 45e52245..33071d28 100755
--- a/.github/release-notes.sh
+++ b/.github/release-notes.sh
@@ -31,15 +31,35 @@ title="$3"
# A conventional-commit type, with its optional (scope) and breaking `!`.
type='^[a-z]+(\([^)]*\))?!?: '
-## Keep the changes list ADHD-friendly, small, and each line should have at most one emoji that is appropriate to that line in the beginning.
+# Each line opens with one mark for what it touches, from the commit's
+# scope where it has one and its type where it has not - a fix reads as a
+# fix at a glance, and the text rows stand apart from the timeline's. A
+# subject with neither carries no mark rather than a wrong one.
+marks='text=πŸ“ speech=πŸ—£οΈ enhance=πŸ—£οΈ keyframes=🎞️ effects=✨ render=✨ colour=✨ color=✨ timeline=βœ‚οΈ media=πŸ“ export=πŸ“€ settings=βš™οΈ i18n=🌍 locales=🌍 api=πŸ€– server=πŸ€– android=πŸ“± ios=πŸ“± models=πŸ“¦ inspector=πŸ–₯️ window=πŸ–₯️ workspace=πŸ–₯️ ui=πŸ–₯️ start=πŸ–₯️ feat=✨ fix=πŸ› perf=⚑'
changes=$(git log "$since..$until" --no-merges --format='%s' 2>/dev/null \
- | grep -Ev '^(Update [^ ]+\.(rs|slint|toml|md|yml)|Lock the flake|Format the workspace|Changelog for|Merge )' \
+ | grep -Ev '^(Update [^ ]+\.[a-z]+|Lock the flake|Format the workspace|Changelog for|Merge )' \
| grep -Ev 'in the (export|pool) tests$' \
| grep -Eiv '^(test|chore|ci|build|refactor|style|docs)(\([^)]*\))?!?: ' \
- | grep -Eiv "${type}.*(clippy|lint|rustfmt|(unused|duplicate|missing) [A-Za-z]* ?import|non-existent|does not compile|before test module)" \
+ | grep -Eiv "${type}.*(clippy|lint|rustfmt|(unused|duplicate|missing) [A-Za-z]* ?import|non-existent|does not compile|before test module|green again)" \
| grep -Eiv '^(updates?|wip|fixes?|cleanup)\.?$' \
- | sed -E "s/${type}//" \
- | awk '{ print toupper(substr($0, 1, 1)) substr($0, 2) }' \
+ | awk -v marks="$marks" '
+ BEGIN {
+ n = split(marks, pairs, " ")
+ for (i = 1; i <= n; i++) { split(pairs[i], kv, "="); mark[kv[1]] = kv[2] }
+ }
+ {
+ prefix = ""
+ if (match($0, /^[a-z]+(\([^)]*\))?!?: /)) {
+ head = substr($0, 1, RLENGTH)
+ $0 = substr($0, RLENGTH + 1)
+ kind = head; sub(/[(!:].*/, "", kind)
+ scope = ""
+ if (match(head, /\([^)]*\)/)) scope = substr(head, RSTART + 1, RLENGTH - 2)
+ if (scope in mark) prefix = mark[scope] " "
+ else if (kind in mark) prefix = mark[kind] " "
+ }
+ print prefix toupper(substr($0, 1, 1)) substr($0, 2)
+ }' \
| awk '!seen[$0]++' \
| sed 's/^/- /')