mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-03 17:16:48 +00:00
Upate ghpr to accept a name field
This commit is contained in:
parent
62ac80be7c
commit
4e3ae30513
@ -8,7 +8,7 @@ PRNUM=""
|
|||||||
|
|
||||||
if [[ "$1" == "" ]]; then
|
if [[ "$1" == "" ]]; then
|
||||||
echo "Usage"
|
echo "Usage"
|
||||||
echo "ghpr <remote> <pr number>"
|
echo "ghpr <remote> <pr number> [pr name]"
|
||||||
echo "Example"
|
echo "Example"
|
||||||
echo "ghpr origin 100"
|
echo "ghpr origin 100"
|
||||||
echo
|
echo
|
||||||
@ -24,8 +24,13 @@ else
|
|||||||
PRNUM="$2"
|
PRNUM="$2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "git fetch $REMOTE refs/pull/$PRNUM/head:PR_$PRNUM"
|
PRNAME="$3"
|
||||||
git fetch "$REMOTE" "refs/pull/$PRNUM/head:PR_$PRNUM"
|
if [[ "$PRNAME" == "" ]]; then
|
||||||
|
PRNAME="PR_$PRNUM"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "git fetch $REMOTE refs/pull/$PRNUM/head:$PRNAME"
|
||||||
|
git fetch "$REMOTE" "refs/pull/$PRNUM/head:$PRNAME"
|
||||||
|
|
||||||
echo "Just fetched Pull Request #$PRNUM. To switch to this branch execute:"
|
echo "Just fetched Pull Request #$PRNUM. To switch to this branch execute:"
|
||||||
echo "git checkout PR_$PRNUM"
|
echo "git checkout $PRNAME"
|
||||||
|
Loading…
Reference in New Issue
Block a user