From 4c078b1a9952047c1ee4564982791ce23362066b Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Mon, 13 Jul 2015 16:15:05 -0700 Subject: [PATCH] hack/cherry_pick_pull.sh: Coach user on how to make a pull against non-master --- hack/cherry_pick_pull.sh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/hack/cherry_pick_pull.sh b/hack/cherry_pick_pull.sh index 0eca37b7a0a..b53a26adc78 100755 --- a/hack/cherry_pick_pull.sh +++ b/hack/cherry_pick_pull.sh @@ -123,18 +123,31 @@ for pull in "${PULLS[@]}"; do done gitamcleanup=false +function make-a-pr() { + echo "+++ Now you must propose ${NEWBRANCH} as a pull against ${BRANCH} (<--- NOT MASTER)." + echo " You are constructing a pull against the upstream release branch! To do" + echo " this in the GitHub UI, when you get to the 'Comparing Changes' screen, keep the" + echo " 'base fork' as GoogleCloudPlatform/kubernetes, but change the 'base' to e.g. 'release-1.0'," + echo " presumably ${BRANCH}. (This selection is near the top left.)" + echo + echo " Use this subject: 'Automated cherry pick of ${PULLSUBJ}' and include a justification." + echo + echo " Note: the tools actually scrape the branch name you just pushed, so don't worry about" + echo " the subject too much, but DO keep at least ${NEWBRANCHREQ} in the remote branch name." + echo +} + if git remote -v | grep ^origin | grep GoogleCloudPlatform/kubernetes.git; then echo "!!! You have 'origin' configured as your GoogleCloudPlatform/kubernetes.git" echo "This isn't normal. Leaving you with push instructions:" echo + echo "+++ First manually push the branch this script created:" + echo echo " git push REMOTE ${NEWBRANCHUNIQ}:${NEWBRANCH}" echo echo "where REMOTE is your personal fork (maybe 'upstream'? Consider swapping those.)." - echo "Then propose ${NEWBRANCH} as a pull against ${BRANCH} (NOT MASTER)." - echo "Use this subject: 'Automated cherry pick of ${PULLSUBJ}' and include a justification." - echo "" - echo "Note: the tools actually scrape the branch name you just pushed, so don't worry about" - echo "the subject too much, but DO keep at least ${NEWBRANCHREQ} in the remote branch name." + echo + make-a-pr cleanbranch="" exit 0 fi @@ -151,11 +164,4 @@ if ! [[ "${REPLY}" =~ ^[yY]$ ]]; then fi git push origin -f "${NEWBRANCHUNIQ}:${NEWBRANCH}" - -echo -echo "+++ Now you must propose ${NEWBRANCH} as a pull against ${BRANCH} (NOT MASTER)." -echo " Use this subject: 'Automated cherry pick of ${PULLSUBJ}' and include a justification." -echo "" -echo " Note: the tools actually scrape the branch name you just pushed, so don't worry about" -echo " the subject too much, but DO keep at least ${NEWBRANCHREQ} in the remote branch name." -echo +make-a-pr