cherry_pick_pull.sh: decode quoted-printables when making pr

This commit is contained in:
Yousong Zhou
2019-03-28 07:28:42 +00:00
committed by Yousong Zhou
parent a595427f12
commit ac1f1151d9

View File

@@ -195,6 +195,8 @@ for pull in "${PULLS[@]}"; do
# set the subject
subject=$(grep -m 1 "^Subject" "/tmp/${pull}.patch" | sed -e 's/Subject: \[PATCH//g' | sed 's/.*] //')
subject_=$(echo "$subject" | python -c 'from email.Header import decode_header as f; import sys; s=sys.stdin.read(); print f(s)[0][0]')
[ -z "$subject_" ] || subject="$subject_"
SUBJECTS+=("#${pull}: ${subject}")
# remove the patch file from /tmp