We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9447642 + 95ee1fa commit 7fec4e7Copy full SHA for 7fec4e7
contrib/sync-upstream.sh
@@ -100,11 +100,20 @@ git checkout master
100
git pull
101
git checkout -b temp-merge-"$PRNUM"
102
103
+# Escape single quote
104
+# ' -> '\''
105
+quote() {
106
+ local quoted=${1//\'/\'\\\'\'}
107
+ printf "%s" "$quoted"
108
+}
109
+TITLE=$(quote "$TITLE")
110
+BODY=$(quote "$BODY")
111
+
112
BASEDIR=$(dirname "$0")
113
FNAME="$BASEDIR/gh-pr-create.sh"
114
cat <<EOT > "$FNAME"
115
#!/bin/sh
-gh pr create -t "$TITLE" -b "$BODY" --web
116
+gh pr create -t '$TITLE' -b '$BODY' --web
117
# Remove temporary branch
118
git checkout master
119
git branch -D temp-merge-"$PRNUM"
0 commit comments