Fix(release): Handle commits without PR numbers gracefully

This commit is contained in:
Mio.
2025-12-10 23:36:01 +01:00
parent db005805d5
commit 0168daab08

View File

@@ -36,9 +36,11 @@ jobs:
for COMMIT in $MERGE_COMMITS; do for COMMIT in $MERGE_COMMITS; do
# Extract PR number # Extract PR number
PR_NUMBER=$(git show --format=%B -s $COMMIT | grep -oP 'Merge pull request #\K\d+') PR_NUMBER=$(git show --format=%B -s $COMMIT | grep -oP 'Merge pull request #\K\d+' || true)
# Fallback: Try to match squash merge pattern "Title (#123)"
if [ -z "$PR_NUMBER" ]; then if [ -z "$PR_NUMBER" ]; then
PR_NUMBER=$(git show --format=%B -s $COMMIT | grep -oP '\(#\K\d+(?=\))') PR_NUMBER=$(git show --format=%B -s $COMMIT | grep -oP '\(#\K\d+(?=\))' || true)
fi fi
if [ -n "$PR_NUMBER" ]; then if [ -n "$PR_NUMBER" ]; then