Created
April 13, 2019 22:00
-
-
Save matthiasbeyer/2b193bca7912176801aa31990ad60014 to your computer and use it in GitHub Desktop.
A script to apply github PRs as one commit
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
#!/usr/bin/env bash | |
while read line | |
do | |
patch=$(echo "$line" | sed | |
's,github\.com,patch-diff.githubusercontent.com/raw,; s,$,.patch,') | |
prnr=$(echo "$line" | sed 's,.*/,,') | |
curl $patch | git am -s || exit 1 | |
echo "Closes #$prnr" | |
done < "${1:-/dev/stdin}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment