A script to apply github PRs as one commit
#!/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