Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,24 @@ else
local type="$1"
local msg="$2"

# Extract optional scope (e.g. "anthropic" from "fix(anthropic): foo")
local scope
scope=$(echo "$msg" | sed -En 's/^[a-zA-Z]+\(([^)]*)\):.*/\1/p')

# Strip the conventional commit prefix (e.g. "feat: ", "fix(scope): ")
local display
display=$(echo "$msg" | sed -E 's/^[a-zA-Z]+(\([^)]*\))?:[[:space:]]*//')

# Capitalize the first letter
display="$(echo "${display:0:1}" | tr '[:lower:]' '[:upper:]')${display:1}"

# Label perf commits explicitly
if [ "$type" = "perf" ]; then
# Label perf commits explicitly, include scope if present
if [ "$type" = "perf" ] && [ -n "$scope" ]; then
display="(perf/${scope}) ${display}"
elif [ "$type" = "perf" ]; then
display="(perf) ${display}"
elif [ -n "$scope" ]; then
display="(${scope}) ${display}"
fi

# Format PR link if present
Expand Down
Loading