6262
6363 # Get commits between tags
6464 if [ "$PREVIOUS_TAG" != "" ] && git rev-parse --verify "$PREVIOUS_TAG" >/dev/null 2>&1; then
65- COMMITS=$(git log --pretty=format:"%s|%h|%ae " "$PREVIOUS_TAG..$CURRENT_TAG")
65+ COMMITS=$(git log --pretty=format:"%s|%h" "$PREVIOUS_TAG..$CURRENT_TAG")
6666 else
67- COMMITS=$(git log --pretty=format:"%s|%h|%ae ")
67+ COMMITS=$(git log --pretty=format:"%s|%h")
6868 fi
6969
7070 # Filter out common git cruft messages
7474 echo "### 🚀 New Features" >> release_notes.md
7575 FEATURES=$(echo "$COMMITS" | grep -i "^feat\|^add\|^new" || true)
7676 if [ -n "$FEATURES" ]; then
77- echo "$FEATURES" | while IFS='|' read -r subject hash email; do
78- # Get GitHub handle from email using GitHub API
79- GITHUB_HANDLE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
80- "https://api.github.com/search/users?q=${email}+in:email" | \
81- jq -r '.items[0].login // empty' 2>/dev/null || echo "")
82-
83- if [ -n "$GITHUB_HANDLE" ] && [ "$GITHUB_HANDLE" != "null" ]; then
84- echo "- $subject (\`$hash\`) by @$GITHUB_HANDLE" >> release_notes.md
85- else
86- # Fallback to email if GitHub handle not found
87- echo "- $subject (\`$hash\`) by $email" >> release_notes.md
88- fi
77+ echo "$FEATURES" | while IFS='|' read -r subject hash; do
78+ echo "- $subject (\`$hash\`)" >> release_notes.md
8979 done
9080 else
9181 echo "- No new features in this release" >> release_notes.md
9585 echo "### 🐛 Bug Fixes" >> release_notes.md
9686 FIXES=$(echo "$COMMITS" | grep -i "^fix\|^bug\|^patch" || true)
9787 if [ -n "$FIXES" ]; then
98- echo "$FIXES" | while IFS='|' read -r subject hash email; do
99- # Get GitHub handle from email using GitHub API
100- GITHUB_HANDLE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
101- "https://api.github.com/search/users?q=${email}+in:email" | \
102- jq -r '.items[0].login // empty' 2>/dev/null || echo "")
103-
104- if [ -n "$GITHUB_HANDLE" ] && [ "$GITHUB_HANDLE" != "null" ]; then
105- echo "- $subject (\`$hash\`) by @$GITHUB_HANDLE" >> release_notes.md
106- else
107- # Fallback to email if GitHub handle not found
108- echo "- $subject (\`$hash\`) by $email" >> release_notes.md
109- fi
88+ echo "$FIXES" | while IFS='|' read -r subject hash; do
89+ echo "- $subject (\`$hash\`)" >> release_notes.md
11090 done
11191 else
11292 echo "- No bug fixes in this release" >> release_notes.md
@@ -116,18 +96,8 @@ jobs:
11696 echo "### 📝 Documentation & Other Changes" >> release_notes.md
11797 OTHER=$(echo "$COMMITS" | grep -iv "^feat\|^add\|^new\|^fix\|^bug\|^patch" || true)
11898 if [ -n "$OTHER" ]; then
119- echo "$OTHER" | while IFS='|' read -r subject hash email; do
120- # Get GitHub handle from email using GitHub API
121- GITHUB_HANDLE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
122- "https://api.github.com/search/users?q=${email}+in:email" | \
123- jq -r '.items[0].login // empty' 2>/dev/null || echo "")
124-
125- if [ -n "$GITHUB_HANDLE" ] && [ "$GITHUB_HANDLE" != "null" ]; then
126- echo "- $subject (\`$hash\`) by @$GITHUB_HANDLE" >> release_notes.md
127- else
128- # Fallback to email if GitHub handle not found
129- echo "- $subject (\`$hash\`) by $email" >> release_notes.md
130- fi
99+ echo "$OTHER" | while IFS='|' read -r subject hash; do
100+ echo "- $subject (\`$hash\`)" >> release_notes.md
131101 done
132102 else
133103 echo "- No other changes in this release" >> release_notes.md
0 commit comments