mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-21 08:46:31 +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
|
||||
echo "Usage"
|
||||
echo "ghpr <remote> <pr number>"
|
||||
echo "ghpr <remote> <pr number> [pr name]"
|
||||
echo "Example"
|
||||
echo "ghpr origin 100"
|
||||
echo
|
||||
@ -24,8 +24,13 @@ else
|
||||
PRNUM="$2"
|
||||
fi
|
||||
|
||||
echo "git fetch $REMOTE refs/pull/$PRNUM/head:PR_$PRNUM"
|
||||
git fetch "$REMOTE" "refs/pull/$PRNUM/head:PR_$PRNUM"
|
||||
PRNAME="$3"
|
||||
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 "git checkout PR_$PRNUM"
|
||||
echo "git checkout $PRNAME"
|
||||
|
Loading…
Reference in New Issue
Block a user