Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A script to apply github PRs as one commit
#!/usr/bin/env bash
while read line
patch=$(echo "$line" | sed
's,github\.com,,; 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