termux_devenv/files/pullrequest.sh

15 lines
357 B
Bash
Raw Normal View History

#!/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