Skip to content

Commit 30b714e

Browse files
authored
fix: handle release notes with NONE value correctly. (#37)
1 parent 16173c2 commit 30b714e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generate-changelog.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ for PR_NUMBER in $PR_COMMITS; do
5757
CLEAN_TITLE=$(echo "$TITLE" | sed -E 's/^[a-z]+(\([^)]+\))?(!)?:[[:space:]]+//')
5858

5959
# Extract release note block, we only extract the "user" related notes.
60-
RELEASE_NOTE=$(echo "$BODY" | awk '/^```[[:space:]]*(breaking|feature|bugfix|doc|other)[[:space:]]+user[[:space:]]*$/ {flag=1; next} /^```[[:space:]]*$/ {flag=0} flag' || true)
61-
60+
RELEASE_NOTE=$(echo "$BODY" | awk '/^```[[:space:]]*(breaking|feature|bugfix|doc|other)[[:space:]]+user[[:space:]]*$/ {flag=1; next} /^```[[:space:]]*$/ {flag=0} flag' | grep -v 'NONE' || true)
6261
# Format entry
6362
ENTRY="- $CLEAN_TITLE [#${PR_NUMBER}](${URL})"
64-
if [[ -n "$RELEASE_NOTE" || "$RELEASE_NOTE" != "NONE" ]]; then
63+
64+
if [[ -n "$RELEASE_NOTE" ]]; then
6565
ENTRY+=": $RELEASE_NOTE"
6666
else
6767
ENTRY+="."

0 commit comments

Comments
 (0)