Skip to content

Instantly share code, notes, and snippets.

@johann8384
Created February 1, 2014 00:22
Show Gist options
  • Save johann8384/8746072 to your computer and use it in GitHub Desktop.
Save johann8384/8746072 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
TARGET=Contegix
ISSUE=0
USER=johann8384
while getopts “hi:p:r:l:cf” OPTION
do
case $OPTION in
h)
usage
exit 1
;;
i)
ISSUE=$OPTARG
;;
t)
TARGET=$OPTARG
;;
u)
USER=$OPTARG
;;
?)
usage
exit
;;
esac
done
if [ "$ISSUE" -lt "1" ]; then
echo "You must supply an issue.";
exit 0;
fi
/usr/bin/env hub pull-request -i $ISSUE -b $TARGET:master -h $USER:$BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment