diff --git a/hack/cherry_pick_pull.sh b/hack/cherry_pick_pull.sh index b5e67e5a3a8..caad8083ef7 100755 --- a/hack/cherry_pick_pull.sh +++ b/hack/cherry_pick_pull.sh @@ -35,6 +35,7 @@ fi if ! which hub > /dev/null; then echo "Can't find 'hub' tool in PATH, please install from https://github.com/github/hub" + exit 1 fi if [[ "$#" -lt 2 ]]; then @@ -133,9 +134,13 @@ done gitamcleanup=false function make-a-pr() { + local rel=$(basename ${BRANCH}) echo "+++ Creating a pull request on github" - echo hub pull-request -m "Automated cherry pick of ${PULLSUBJ}" -h ${GITHUB_USER}:${NEWBRANCH} -b GoogleCloudPlatform:`basename ${BRANCH}` - hub pull-request -m "Automated cherry pick of ${PULLSUBJ}" -h ${GITHUB_USER}:${NEWBRANCH} -b GoogleCloudPlatform:`basename ${BRANCH}` + hub pull-request -F- -h "${GITHUB_USER}:${NEWBRANCH}" -b "GoogleCloudPlatform:${rel}" <