Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion contrib/sync-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,20 @@ git checkout master
git pull
git checkout -b temp-merge-"$PRNUM"

# Escape single quote
# ' -> '\''
quote() {
local quoted=${1//\'/\'\\\'\'}
printf "%s" "$quoted"
}
TITLE=$(quote "$TITLE")
BODY=$(quote "$BODY")

BASEDIR=$(dirname "$0")
FNAME="$BASEDIR/gh-pr-create.sh"
cat <<EOT > "$FNAME"
#!/bin/sh
gh pr create -t "$TITLE" -b "$BODY" --web
gh pr create -t '$TITLE' -b '$BODY' --web
# Remove temporary branch
git checkout master
git branch -D temp-merge-"$PRNUM"
Expand Down