Created
May 23, 2016 20:58
-
-
Save Narretz/2a7283c34ce24f8358e2f1a6fa2a22e2 to your computer and use it in GitHub Desktop.
Bash script that extracts commits from Github PR and puts them on top of the current branch
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
#!/bin/bash | |
set -e | |
prurl=${1:?"Pull request URL is mandatory"} | |
prno=${prurl##*/} | |
curl -kL "$prurl.patch" | git am -3 && git commit --amend -m "$(git show --format=%B HEAD -s) | |
Closes #${prno}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment