diff --git a/hack/cherry_pick_pull.sh b/hack/cherry_pick_pull.sh index 9c809fdab32..f320185f6be 100755 --- a/hack/cherry_pick_pull.sh +++ b/hack/cherry_pick_pull.sh @@ -169,7 +169,7 @@ for pull in "${PULLS[@]}"; do fi } # set the subject - subject=$(grep "^Subject" "/tmp/${pull}.patch" | sed -e 's/Subject: \[PATCH\] //g') + subject=$(grep -m 1 "^Subject" "/tmp/${pull}.patch" | sed -e 's/Subject: \[PATCH//g' | sed 's/.*] //') SUBJECTS+=("#${pull}: ${subject}") done gitamcleanup=false