Last active
January 4, 2017 21:19
-
-
Save wsanchez/87d1d9d0ccaddb074de3f8313decedf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -u | |
# Too lazy for proper options parsing | |
PR_NUMBER="$1"; shift; | |
TICKET_NUMBER="$1"; shift; | |
BRANCH_NAME="$1"; shift; | |
#repo="https://github.com/twisted/twisted.git"; | |
repo="git@github.com:twisted/twisted.git"; | |
clone="$(mktemp -d -t twisted)"; | |
git clone --progress "${repo}" "${clone}"; | |
cd "${clone}"; | |
git fetch origin "refs/pull/${PR_NUMBER}/head"; | |
git push origin "FETCH_HEAD:refs/heads/${TICKET_NUMBER}-${BRANCH_NAME}"; | |
rm -fr "${clone}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment