#!/usr/bin/env bash
# Select and checkout a GitHub pull request using the GitHub CLI (required)
set -e
export GH_NO_UPDATE_NOTIFIER=1
prid=$(gh pr list --limit 100 | fzf | awk '{print $1}')
if [ -z $prid ]; then
exit 0
fi
gh pr checkout $prid