prf - PullRequest Fetch - lists open-pullrequests to stdout
prf
Is checking out a git branch for code review bothering you? In general, you may open the PR's page then copy the branch name then back to terminal then checkout the branch.
Using prf
with interactive filtering tools such as peco or fzf provides you a solution for the problem (see EXAMPLES below).
Checkout the git branch corresponding to a open-pullrequest interactivly using peco:
prf | peco | cut -f3 | xargs git checkout
go get github.com/yuku-t/prf
Or clone the repository and run:
make install
Then issue a personal access token with "repo" scope and register it as "api.github.com" machine's password to netrc file:
cat <<-EOS >>~/.netrc
machine api.github.com
password PERSONAL_ACCESS_TOKEN
EOS
chmod 600 ~/.netrc