Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. gpr() {
  2. NEWLINE=$'\n';
  3. lastCommitMessage=$(git log -1 --pretty=%B);
  4. ticketNumber=$(echo $lastCommitMessage | cut -d ":" -f2 | cut -d " " -f2);
  5. message=$(<./.github/PULL_REQUEST_TEMPLATE.md);
  6. messageReplaced=$(sed -e "s/GEOR-xxx/$ticketNumber/g" <<< $message);
  7.  
  8. hub pull-request -m "$lastCommitMessage$NEWLINE$messageReplaced" -o;
  9. }
Add Comment
Please, Sign In to add comment