#!/bin/bash set -e set -x request_id="$1" remote=${2:-"upstream"} git fetch "$remote" "pull/$request_id/head" git checkout -B "review-${request_id}" $remote/master git reset --hard FETCH_HEAD git pull --rebase