mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
hack/cherry_pick_pull.sh: Coach user on how to make a pull against non-master
This commit is contained in:
parent
e71b6f90de
commit
4c078b1a99
@ -123,18 +123,31 @@ for pull in "${PULLS[@]}"; do
|
|||||||
done
|
done
|
||||||
gitamcleanup=false
|
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
|
if git remote -v | grep ^origin | grep GoogleCloudPlatform/kubernetes.git; then
|
||||||
echo "!!! You have 'origin' configured as your GoogleCloudPlatform/kubernetes.git"
|
echo "!!! You have 'origin' configured as your GoogleCloudPlatform/kubernetes.git"
|
||||||
echo "This isn't normal. Leaving you with push instructions:"
|
echo "This isn't normal. Leaving you with push instructions:"
|
||||||
echo
|
echo
|
||||||
|
echo "+++ First manually push the branch this script created:"
|
||||||
|
echo
|
||||||
echo " git push REMOTE ${NEWBRANCHUNIQ}:${NEWBRANCH}"
|
echo " git push REMOTE ${NEWBRANCHUNIQ}:${NEWBRANCH}"
|
||||||
echo
|
echo
|
||||||
echo "where REMOTE is your personal fork (maybe 'upstream'? Consider swapping those.)."
|
echo "where REMOTE is your personal fork (maybe 'upstream'? Consider swapping those.)."
|
||||||
echo "Then propose ${NEWBRANCH} as a pull against ${BRANCH} (NOT MASTER)."
|
echo
|
||||||
echo "Use this subject: 'Automated cherry pick of ${PULLSUBJ}' and include a justification."
|
make-a-pr
|
||||||
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."
|
|
||||||
cleanbranch=""
|
cleanbranch=""
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -151,11 +164,4 @@ if ! [[ "${REPLY}" =~ ^[yY]$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
git push origin -f "${NEWBRANCHUNIQ}:${NEWBRANCH}"
|
git push origin -f "${NEWBRANCHUNIQ}:${NEWBRANCH}"
|
||||||
|
make-a-pr
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user