Created
May 20, 2018 17:54
-
-
Save keriati/b9904c7aeae83b385223530569da46ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
gpr() { | |
NEWLINE=$'\n'; | |
lastCommitMessage=$(git log -1 --pretty=%B); | |
ticketNumber=$(echo $lastCommitMessage | cut -d ":" -f2 | cut -d " " -f2); | |
message=$(<./.github/PULL_REQUEST_TEMPLATE.md); | |
messageReplaced=$(sed -e "s/GEOR-xxx/$ticketNumber/g" <<< $message); | |
hub pull-request -m "$lastCommitMessage$NEWLINE$messageReplaced" -o; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment