prat: a bash function to rapidly submit a pull request
# Usage: prat my-feature-branch "My commit (and pull request message)" | |
# Requirements: https://hub.github.com/ | |
function prat() | |
{ | |
BRANCH=${1:-} | |
MESSAGE=${2:-} | |
git diff | |
read -e -p "You sure? " SURE | |
if [[ "$SURE" == "y" ]]; then | |
git checkout -b $BRANCH | |
git add . | |
git commit -m "$MESSAGE" | |
git push -u | |
PR_URL=$(hub pr -m "$MESSAGE") | |
echo $PR_URL | |
open $PR_URL | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment