You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
357 B

#!/bin/bash
if [ -z "${1}" ]; then
echo "No PR# specified, here is a list:"
curl -s https://api.github.com/repos/Bitmessage/PyBitmessage/pulls -s | jq '.[] | .number, .title' | paste - -
exit 1
fi
echo "Checking out PR ${1}"
curbranch=$(git status|head -1|cut -d\ -f3-)
git pull --all
git fetch -u origin pull/"$1"/head:"$1"
git checkout $1